From c81ffac66448e4e35c41e26ecfcabbb245c1ac24 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 24 Apr 2013 12:02:05 -0700 Subject: [PATCH] Fix whitespace errors. --- .../guacamole/net/basic/ProtocolInfo.java | 14 +++++----- .../net/basic/ProtocolParameter.java | 18 ++++++------- .../net/basic/ProtocolParameterOption.java | 12 ++++----- .../net/basic/crud/connections/List.java | 2 +- .../net/basic/crud/protocols/List.java | 26 +++++++++---------- .../net/basic/xml/DocumentHandler.java | 2 +- .../guacamole/net/basic/xml/TagHandler.java | 4 +-- .../basic/xml/protocol/OptionTagHandler.java | 10 +++---- .../basic/xml/protocol/ParamTagHandler.java | 18 ++++++------- .../xml/protocol/ProtocolTagHandler.java | 16 ++++++------ .../xml/user_mapping/AuthorizeTagHandler.java | 8 +++--- .../user_mapping/ConnectionTagHandler.java | 6 ++--- 12 files changed, 68 insertions(+), 68 deletions(-) diff --git a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/ProtocolInfo.java b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/ProtocolInfo.java index 996fee8a5..088056717 100644 --- a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/ProtocolInfo.java +++ b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/ProtocolInfo.java @@ -26,7 +26,7 @@ import java.util.Collection; * Describes a protocol and all parameters associated with it, as required by * a protocol plugin for guacd. This class allows known parameters for a * protocol to be exposed to the user as friendly fields. - * + * * @author Michael Jumper */ public class ProtocolInfo { @@ -46,10 +46,10 @@ public class ProtocolInfo { */ private Collection parameters = new ArrayList(); - + /** * Returns the human-readable title associated with this protocol. - * + * * @return The human-readable title associated with this protocol. */ public String getTitle() { @@ -58,7 +58,7 @@ public class ProtocolInfo { /** * Sets the human-readable title associated with this protocol. - * + * * @param title The human-readable title to associate with this protocol. */ public void setTitle(String title) { @@ -68,7 +68,7 @@ public class ProtocolInfo { /** * Returns the unique name of this protocol. The protocol name is the * value required by the corresponding protocol plugin for guacd. - * + * * @return The unique name of this protocol. */ public String getName() { @@ -78,7 +78,7 @@ public class ProtocolInfo { /** * Sets the unique name of this protocol. The protocol name is the value * required by the corresponding protocol plugin for guacd. - * + * * @param name The unique name of this protocol. */ public void setName(String name) { @@ -89,7 +89,7 @@ public class ProtocolInfo { * Returns a mutable collection of the protocol parameters associated with * this protocol. Changes to this collection affect the parameters exposed * to the user. - * + * * @return A mutable collection of protocol parameters. */ public Collection getParameters() { diff --git a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/ProtocolParameter.java b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/ProtocolParameter.java index 0b08bd747..4c162f318 100644 --- a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/ProtocolParameter.java +++ b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/ProtocolParameter.java @@ -24,7 +24,7 @@ import java.util.Collection; /** * Represents a parameter of a protocol. - * + * * @author Michael Jumper */ public class ProtocolParameter { @@ -60,7 +60,7 @@ public class ProtocolParameter { */ ENUM } - + /** * The unique name that identifies this parameter to the protocol plugin. */ @@ -75,18 +75,18 @@ public class ProtocolParameter { * The type of this field. */ private Type type; - + /** * The value of this parameter, for boolean parameters. */ private String value; - + /** * A collection of all associated parameter options. */ private Collection options = new ArrayList(); - + /** * Returns the name associated with this protocol parameter. * @return The name associated with this protocol parameter. @@ -99,7 +99,7 @@ public class ProtocolParameter { * Sets the name associated with this protocol parameter. This name must * uniquely identify this parameter among the others accepted by the * corresponding protocol. - * + * * @param name The name to assign to this protocol parameter. */ public void setName(String name) { @@ -117,7 +117,7 @@ public class ProtocolParameter { /** * Sets the title associated with this protocol parameter. The title must * be a human-readable string which describes accurately this parameter. - * + * * @param title A human-readable string describing this parameter. */ public void setTitle(String title) { @@ -135,7 +135,7 @@ public class ProtocolParameter { /** * Sets the value associated with this protocol parameter. The value must * be a human-readable string which describes accurately this parameter. - * + * * @param value A human-readable string describing this parameter. */ public void setValue(String value) { @@ -161,7 +161,7 @@ public class ProtocolParameter { /** * Returns a mutable collection of protocol parameter options. Changes to * this collection directly affect the available options. - * + * * @return A mutable collection of parameter options. */ public Collection getOptions() { diff --git a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/ProtocolParameterOption.java b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/ProtocolParameterOption.java index 5416e6ad9..5a99d575c 100644 --- a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/ProtocolParameterOption.java +++ b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/ProtocolParameterOption.java @@ -21,7 +21,7 @@ package net.sourceforge.guacamole.net.basic; /** * Describes an available legal value for an enumerated protocol parameter. - * + * * @author Michael Jumper */ public class ProtocolParameterOption { @@ -31,16 +31,16 @@ public class ProtocolParameterOption { * chosen. */ private String value; - + /** * A human-readable title describing the effect of the value. */ private String title; /** - * Returns the value that will be sent to the client plugin if this option + * Returns the value that will be sent to the client plugin if this option * is chosen. - * + * * @return The value that will be sent if this option is chosen. */ public String getValue() { @@ -50,7 +50,7 @@ public class ProtocolParameterOption { /** * Sets the value that will be sent to the client plugin if this option is * chosen. - * + * * @param value The value to send if this option is chosen. */ public void setValue(String value) { @@ -72,5 +72,5 @@ public class ProtocolParameterOption { public void setTitle(String title) { this.title = title; } - + } diff --git a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/crud/connections/List.java b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/crud/connections/List.java index 4decb4a49..4286775a5 100644 --- a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/crud/connections/List.java +++ b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/crud/connections/List.java @@ -99,7 +99,7 @@ public class List extends AuthenticatingHttpServlet { // Sys-admin permission Permission systemPermission = new SystemPermission(SystemPermission.Type.ADMINISTER); - + // Write actual XML try { diff --git a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/crud/protocols/List.java b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/crud/protocols/List.java index 32136540c..efdc91320 100644 --- a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/crud/protocols/List.java +++ b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/crud/protocols/List.java @@ -66,10 +66,10 @@ public class List extends AuthenticatingHttpServlet { */ private static final String[] KNOWN_PROTOCOLS = new String[]{ "vnc", "rdp", "ssh"}; - + /** * Parses the given XML file, returning the parsed ProtocolInfo. - * + * * @param input An input stream containing XML describing the parameters * associated with a protocol supported by Guacamole. * @return A new ProtocolInfo object which contains the parameters described @@ -115,7 +115,7 @@ public class List extends AuthenticatingHttpServlet { /** * Given an XML stream and a fully-populated ProtocolInfo object, writes * out the corresponding protocol XML describing all available parameters. - * + * * @param xml The XMLStreamWriter to use to write the XML. * @param protocol The ProtocolInfo object to read parameters and protocol * information from. @@ -124,7 +124,7 @@ public class List extends AuthenticatingHttpServlet { private void writeProtocol(XMLStreamWriter xml, ProtocolInfo protocol) throws XMLStreamException { - // Write protocol + // Write protocol xml.writeStartElement("protocol"); xml.writeAttribute("name", protocol.getName()); xml.writeAttribute("title", protocol.getTitle()); @@ -170,9 +170,9 @@ public class List extends AuthenticatingHttpServlet { default: throw new UnsupportedOperationException( "Parameter type not supported: " + param.getType()); - + } - + // Write options for (ProtocolParameterOption option : param.getOptions()) { xml.writeStartElement("option"); @@ -183,14 +183,14 @@ public class List extends AuthenticatingHttpServlet { // End parameter xml.writeEndElement(); - + } - - // End protocol + + // End protocol xml.writeEndElement(); } - + @Override protected void authenticatedService( UserContext context, @@ -241,7 +241,7 @@ public class List extends AuthenticatingHttpServlet { } } - + } // If known protocols are not already defined, read from classpath @@ -261,7 +261,7 @@ public class List extends AuthenticatingHttpServlet { } } - + // Write actual XML try { // Write XML content type @@ -277,7 +277,7 @@ public class List extends AuthenticatingHttpServlet { // Write all protocols for (ProtocolInfo protocol : protocols.values()) writeProtocol(xml, protocol); - + // End document xml.writeEndElement(); xml.writeEndDocument(); diff --git a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/DocumentHandler.java b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/DocumentHandler.java index 8c123dfd5..9da30db98 100644 --- a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/DocumentHandler.java +++ b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/DocumentHandler.java @@ -113,7 +113,7 @@ public class DocumentHandler extends DefaultHandler { // Initialize handler handler.init(attributes); - + // Append new element state to stack stack.addLast(new DocumentHandlerState(handler)); diff --git a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/TagHandler.java b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/TagHandler.java index 90af9dc09..9dcef32be 100644 --- a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/TagHandler.java +++ b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/TagHandler.java @@ -45,13 +45,13 @@ public interface TagHandler { /** * Called when the element corresponding to this TagHandler is first seen, * just after an instance is created. - * + * * @param attributes The attributes of the element seen. * @throws SAXException If an error prevents a the TagHandler from being * from being initialized. */ public void init(Attributes attributes) throws SAXException; - + /** * Called when this element, and all child elements, have been fully parsed, * and the entire text content of this element (if any) is available. diff --git a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/protocol/OptionTagHandler.java b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/protocol/OptionTagHandler.java index d7768eee3..d2921a197 100644 --- a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/protocol/OptionTagHandler.java +++ b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/protocol/OptionTagHandler.java @@ -25,8 +25,8 @@ import org.xml.sax.SAXException; /** * TagHandler for the "option" element. - * - * @author Mike Jumper + * + * @author Mike Jumper */ public class OptionTagHandler implements TagHandler { @@ -34,12 +34,12 @@ public class OptionTagHandler implements TagHandler { * The option backing this option tag. */ private ProtocolParameterOption option = new ProtocolParameterOption(); - + @Override public void init(Attributes attributes) throws SAXException { option.setValue(attributes.getValue("value")); } - + @Override public TagHandler childElement(String localName) throws SAXException { throw new SAXException("The 'param' tag can contain no elements."); @@ -57,5 +57,5 @@ public class OptionTagHandler implements TagHandler { public ProtocolParameterOption asProtocolParameterOption() { return option; } - + } diff --git a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/protocol/ParamTagHandler.java b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/protocol/ParamTagHandler.java index 4c29ce16a..38df58bee 100644 --- a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/protocol/ParamTagHandler.java +++ b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/protocol/ParamTagHandler.java @@ -25,8 +25,8 @@ import org.xml.sax.SAXException; /** * TagHandler for the "param" element. - * - * @author Mike Jumper + * + * @author Mike Jumper */ public class ParamTagHandler implements TagHandler { @@ -34,7 +34,7 @@ public class ParamTagHandler implements TagHandler { * The ProtocolParameter backing this tag handler. */ private ProtocolParameter protocolParameter = new ProtocolParameter(); - + @Override public void init(Attributes attributes) throws SAXException { @@ -64,7 +64,7 @@ public class ParamTagHandler implements TagHandler { // Boolean field else if ("boolean".equals(type)) { protocolParameter.setType(ProtocolParameter.Type.BOOLEAN); - + if(protocolParameter.getValue() == null) throw new SAXException ("A value is required for the boolean parameter type."); @@ -73,15 +73,15 @@ public class ParamTagHandler implements TagHandler { // Otherwise, fail with unrecognized type else throw new SAXException("Invalid parameter type: " + type); - + } - + @Override public TagHandler childElement(String localName) throws SAXException { - // Start parsing of option tags + // Start parsing of option tags if (localName.equals("option")) { - + // Get tag handler for option tag OptionTagHandler tagHandler = new OptionTagHandler(); @@ -89,7 +89,7 @@ public class ParamTagHandler implements TagHandler { protocolParameter.getOptions().add( tagHandler.asProtocolParameterOption()); return tagHandler; - + } return null; diff --git a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/protocol/ProtocolTagHandler.java b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/protocol/ProtocolTagHandler.java index 4ff90bd5f..374e8e609 100644 --- a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/protocol/ProtocolTagHandler.java +++ b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/protocol/ProtocolTagHandler.java @@ -25,8 +25,8 @@ import org.xml.sax.SAXException; /** * TagHandler for the "protocol" element. - * - * @author Mike Jumper + * + * @author Mike Jumper */ public class ProtocolTagHandler implements TagHandler { @@ -35,30 +35,30 @@ public class ProtocolTagHandler implements TagHandler { * handler. */ private ProtocolInfo info = new ProtocolInfo(); - + @Override public void init(Attributes attributes) throws SAXException { info.setName(attributes.getValue("name")); info.setTitle(attributes.getValue("title")); } - + @Override public TagHandler childElement(String localName) throws SAXException { - // Start parsing of param tags, add to list of all parameters + // Start parsing of param tags, add to list of all parameters if (localName.equals("param")) { - + // Get tag handler for param tag ParamTagHandler tagHandler = new ParamTagHandler(); // Store stub in parameters collection info.getParameters().add(tagHandler.asProtocolParameter()); return tagHandler; - + } return null; - + } @Override diff --git a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/user_mapping/AuthorizeTagHandler.java b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/user_mapping/AuthorizeTagHandler.java index 6263fe1ab..6e7363e45 100644 --- a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/user_mapping/AuthorizeTagHandler.java +++ b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/user_mapping/AuthorizeTagHandler.java @@ -49,18 +49,18 @@ public class AuthorizeTagHandler implements TagHandler { * The UserMapping this authorization belongs to. */ private UserMapping parent; - + /** * Creates a new AuthorizeTagHandler that parses an Authorization owned * by the given UserMapping. - * + * * @param parent The UserMapping that owns the Authorization this handler * will parse. */ public AuthorizeTagHandler(UserMapping parent) { this.parent = parent; } - + @Override public void init(Attributes attributes) throws SAXException { @@ -88,7 +88,7 @@ public class AuthorizeTagHandler implements TagHandler { } parent.addAuthorization(this.asAuthorization()); - + } @Override diff --git a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/user_mapping/ConnectionTagHandler.java b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/user_mapping/ConnectionTagHandler.java index 31dda722d..e4d214519 100644 --- a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/user_mapping/ConnectionTagHandler.java +++ b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/user_mapping/ConnectionTagHandler.java @@ -45,18 +45,18 @@ public class ConnectionTagHandler implements TagHandler { * The Authorization this connection belongs to. */ private Authorization parent; - + /** * Creates a new ConnectionTagHandler that parses a Connection owned by * the given Authorization. - * + * * @param parent The Authorization that will own this Connection once * parsed. */ public ConnectionTagHandler(Authorization parent) { this.parent = parent; } - + @Override public void init(Attributes attributes) throws SAXException { name = attributes.getValue("name");