GUACAMOLE-38: Clean up minor code issues.

This commit is contained in:
Nick Couchman
2018-05-14 14:00:50 -04:00
parent 27f4ad01f5
commit aaada49dfe
5 changed files with 12 additions and 6 deletions

View File

@@ -50,7 +50,7 @@ public class QuickConnectDirectory extends SimpleDirectory<Connection> {
/**
* The internal counter for connection IDs.
*/
private AtomicInteger connectionId;
private final AtomicInteger connectionId;
/**
* Creates a new QuickConnectDirectory with the default

View File

@@ -25,9 +25,7 @@ import org.apache.guacamole.GuacamoleException;
import org.apache.guacamole.net.auth.AbstractUserContext;
import org.apache.guacamole.net.auth.AuthenticationProvider;
import org.apache.guacamole.net.auth.ConnectionGroup;
import org.apache.guacamole.net.auth.Directory;
import org.apache.guacamole.net.auth.User;
import org.apache.guacamole.net.auth.simple.SimpleDirectory;
import org.apache.guacamole.net.auth.simple.SimpleUser;
/**

View File

@@ -39,7 +39,7 @@ public class QuickConnectionGroup extends AbstractConnectionGroup {
/**
* A set that will store the Connection identifiers for this group.
*/
private Set<String> connectionIdentifiers =
private final Set<String> connectionIdentifiers =
new HashSet<String>(Collections.<String>emptyList());
/**

View File

@@ -38,7 +38,7 @@ public class QuickConnectREST {
/**
* The connection directory for this REST endpoint.
*/
private QuickConnectDirectory directory;
private final QuickConnectDirectory directory;
/**
* Construct a new QuickConnectREST class, taking in a

View File

@@ -20,7 +20,6 @@
package org.apache.guacamole.auth.quickconnect.utility;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.Map;
import org.apache.guacamole.GuacamoleException;
import org.apache.guacamole.protocol.GuacamoleConfiguration;
@@ -35,6 +34,9 @@ public class QCParserTest {
/**
* Verify that the parseQueryString() method functions as designed.
*
* @throws UnsupportedEncodingException
* If Java lacks UTF-8 support.
*/
@Test
public void testParseQueryString() throws UnsupportedEncodingException {
@@ -51,6 +53,9 @@ public class QCParserTest {
/**
* Verify that the parseUserInfo() method functions as designed.
*
* @throws UnsupportedEncodingException
* If Java lacks UTF-8 support.
*/
@Test
public void testParseUserInfo() throws UnsupportedEncodingException {
@@ -79,6 +84,9 @@ public class QCParserTest {
/**
* Verify that the getConfiguration() method returns the expected
* GuacamoleConfiguration object.
*
* @throws GuacamoleException
* If the configuration cannot be parsed from the given URI.
*/
@Test
public void testGetConfiguration() throws GuacamoleException {