From a2b3e235e04dc3efc48e62c2993b717527d069b9 Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Sat, 22 Jun 2019 19:27:33 -0400 Subject: [PATCH] GUACAMOLE-579: Fix up documentation issues. --- .../org/apache/guacamole/token/TokenName.java | 16 +++++++++------- .../apache/guacamole/token/TokenNameTest.java | 5 ++--- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/token/TokenName.java b/guacamole-ext/src/main/java/org/apache/guacamole/token/TokenName.java index 4b36377e9..ae83346a2 100644 --- a/guacamole-ext/src/main/java/org/apache/guacamole/token/TokenName.java +++ b/guacamole-ext/src/main/java/org/apache/guacamole/token/TokenName.java @@ -25,7 +25,7 @@ import java.util.regex.Pattern; /** * Utility class for generating parameter token names. */ -public abstract class TokenName { +public class TokenName { /** * Pattern which matches logical groupings of words within a @@ -57,16 +57,16 @@ public abstract class TokenName { /** * This utility class should not be instantiated. */ - protected TokenName() {} + private TokenName() {} /** * Generates the name of the parameter token that should be populated with * the given string. The provided string will be automatically transformed * from "CamelCase", "headlessCamelCase", "lowercase_with_underscores", * and "mixes_ofBoth_Styles" to consistent "UPPERCASE_WITH_UNDERSCORES". - * Each returned attribute will be prefixed with the string value provided + * Each returned token name will be prefixed with the string value provided * in the prefix. The value provided in prefix will be prepended to the - * attribute name, but will itself not be transformed. + * string, but will itself not be transformed. * * @param name * The string to be used to generate the token name. @@ -102,9 +102,11 @@ public abstract class TokenName { } /** - * Generate the name of a parameter from the given string, and with a blank - * prefix such that the token name will simply be the transformed version - * of the string. + * Generate the name of a parameter token from the given string, with no + * added prefix, such that the token name will simply be the transformed + * version of the string. See + * {@link #canonicalize(java.lang.String, java.lang.String)} + * * * @param name * The string to use to generate the token name. diff --git a/guacamole-ext/src/test/java/org/apache/guacamole/token/TokenNameTest.java b/guacamole-ext/src/test/java/org/apache/guacamole/token/TokenNameTest.java index 7b9d3c2b1..a1d3e2fff 100644 --- a/guacamole-ext/src/test/java/org/apache/guacamole/token/TokenNameTest.java +++ b/guacamole-ext/src/test/java/org/apache/guacamole/token/TokenNameTest.java @@ -23,14 +23,13 @@ import static org.junit.Assert.assertEquals; import org.junit.Test; /** - * Test which verifies automatic generation of LDAP-specific connection - * parameter token names. + * Test which verifies automatic generation of connection parameter token names. */ public class TokenNameTest { /** * Verifies that TokenName.canonicalize() generates token names as - * specified, regardless of the naming convention of the attribute. + * specified, regardless of the format of the provided string. */ @Test public void testCanonicalize() {