Skip to content

Commit

Permalink
Fix some Checkstyle issues
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Oct 11, 2023
1 parent 935ecf2 commit f51ae0e
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 20 deletions.
7 changes: 6 additions & 1 deletion checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@
<!-- Exceptions for Checkstyle -->

<suppressions>

<!-- Disable some checks in tests -->
<suppress checks="JavadocPackage" files="src[/\\]test[/\\]java[/\\]" />
<suppress checks="JavadocMethod" files="src[/\\]test[/\\]java[/\\]" />
<suppress checks="JavadocVariable" files="src[/\\]test[/\\]java[/\\]" />
<suppress checks="MissingJavadocMethod" files="src[/\\]test[/\\]java[/\\]" />

<!-- Disable the warnings for the generated classes -->
<suppress checks=".*" files="ParseException.java"/>
<suppress checks=".*" files="PropertyListParser.java"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ protected DefaultFileSystemManager getManager() {
}

/**
* get the provider configuration
* get the provider configuration.
*/
public ProviderTestConfig getProviderConfig() {
return providerConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void testAllContent() throws Exception {
}

/**
* Tests attributes
* Tests attributes.
*/
@Test
public void testAttributes() throws FileSystemException {
Expand Down Expand Up @@ -237,7 +237,7 @@ public void testInputStreamSingleCleanup() throws Exception {
}

/**
* Tests parent identity
* Tests parent identity.
*/
@Test
public void testParent() throws FileSystemException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public FileInfo getParent() {
}

/**
* Returns the {@link FileType} of the file
* Returns the {@link FileType} of the file.
*
* @return {@link FileType}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ public void testNameResolution() throws Exception {
}

/**
* Tests resolution of relative file names via the FS manager
* Tests resolution of relative file names via the FS manager.
*/
@Test
public void testRelativeURI() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public void testFileExtensions() throws Exception {
}

/**
* Tests matching all
* Tests matching all.
*
* @throws Exception
*/
Expand All @@ -127,7 +127,7 @@ public void testMatchAll() throws Exception {
}

/**
* Tests matching partial file names
* Tests matching partial file names.
*
* @throws Exception
*/
Expand All @@ -139,7 +139,7 @@ public void testMatchPartial() throws Exception {
}

/**
* Tests matching partial file names with delimiter
* Tests matching partial file names with delimiter.
*
* @throws Exception
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void testExecutable() throws Exception {
}

/**
* Tests for the readable permission
* Tests for the readable permission.
*/
@Test
public void testReadable() throws Exception {
Expand All @@ -138,7 +138,7 @@ public void testReadable() throws Exception {
}

/**
* Tests for the writable permission
* Tests for the writable permission.
*/
@Test
public void testWriteable() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static String getConnectionUri() {
}

static int getSocketPort() {
return SocketPort;
return socketPort;
}

static String getSystemTestUriOverride() {
Expand All @@ -118,7 +118,7 @@ synchronized static void setUpClass(final boolean implicit) throws FtpException
return;
}
// Let the OS find use an ephemeral port by using 0.
SocketPort = 0;
socketPort = 0;
final FtpServerFactory serverFactory = new FtpServerFactory();
final PropertiesUserManagerFactory propertiesUserManagerFactory = new PropertiesUserManagerFactory();
final URL userPropsResource = ClassLoader.getSystemClassLoader().getResource(USER_PROPS_RES);
Expand All @@ -131,7 +131,7 @@ synchronized static void setUpClass(final boolean implicit) throws FtpException
user.setHomeDirectory(getTestDirectory());
serverFactory.setUserManager(userManager);
final ListenerFactory listenerFactory = new ListenerFactory();
listenerFactory.setPort(SocketPort);
listenerFactory.setPort(socketPort);

// define SSL configuration
final URL serverJksResource = ClassLoader.getSystemClassLoader().getResource(SERVER_JKS_RES);
Expand Down Expand Up @@ -163,9 +163,9 @@ synchronized static void setUpClass(final boolean implicit) throws FtpException
e.printStackTrace();
}
}
SocketPort = ((org.apache.ftpserver.impl.DefaultFtpServer) embeddedFtpServer).getListener(LISTENER_NAME).getPort();
socketPort = ((org.apache.ftpserver.impl.DefaultFtpServer) embeddedFtpServer).getListener(LISTENER_NAME).getPort();
// System.out.println("Using port " + SocketPort);
connectionUri = "ftps://test:test@localhost:" + SocketPort;
connectionUri = "ftps://test:test@localhost:" + socketPort;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@
import org.junit.jupiter.api.Test;

/**
* Tests https://issues.apache.org/jira/browse/VFS-426
* Tests https://issues.apache.org/jira/browse/VFS-426.
*
* ggregory $
* @since 2.1
*/
public class HttpFilesCacheTest {

/**
* Tests https://issues.apache.org/jira/browse/VFS-426
* Tests https://issues.apache.org/jira/browse/VFS-426.
*/
@Test
public void testQueryStringUrls() throws FileSystemException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import org.junit.jupiter.api.Test;

/**
* Tests VFS-427 NPE on HttpFileObject.getContent().getContentInfo()
* Tests VFS-427 NPE on HttpFileObject.getContent().getContentInfo().
*
* @since 2.1
*/
Expand Down

0 comments on commit f51ae0e

Please sign in to comment.