Index: /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/ConnectorServlet.java
===================================================================
--- /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/ConnectorServlet.java	(revision 3357)
+++ /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/ConnectorServlet.java	(revision 3358)
@@ -78,5 +78,5 @@
 	private static final long serialVersionUID = -5742008970929377161L;
 	private static final Logger logger = LoggerFactory.getLogger(ConnectorServlet.class);
-	private Dispatcher dispatcher;
+	private transient Dispatcher dispatcher;
 
 	/**
Index: /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tags/EditorTag.java
===================================================================
--- /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tags/EditorTag.java	(revision 3357)
+++ /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tags/EditorTag.java	(revision 3358)
@@ -50,5 +50,5 @@
 
 	/** The underlying FCKeditor object */
-	private FCKeditor fckEditor;
+	private transient FCKeditor fckEditor;
 
 	/**
Index: /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/Compatibility.java
===================================================================
--- /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/Compatibility.java	(revision 3357)
+++ /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/Compatibility.java	(revision 3358)
@@ -27,5 +27,5 @@
 
 /**
- * Compatibility check.
+ * Checks browser compatibility with the editor.
  * 
  * @version $Id$
@@ -37,4 +37,5 @@
 	 * 
 	 * @param userAgentString
+	 *            user agent string of a browser
 	 * @return <code>true</code> if compatible otherwise <code>false</code>
 	 */
@@ -42,8 +43,9 @@
 		if (Utils.isEmpty(userAgentString))
 			return false;
-		
+
 		String userAgentStr = userAgentString.toLowerCase();
 
-		// IE 5.5+, check special keys like 'Opera' and 'mac', because there are some
+		// IE 5.5+, check special keys like 'Opera' and 'mac', because there are
+		// some
 		// other browsers, containing 'MSIE' in there agent string!
 		if (userAgentStr.indexOf("opera") < 0
@@ -51,9 +53,9 @@
 				&& getBrowserVersion(userAgentStr, ".*msie ([\\d]+.[\\d]+).*") >= 5.5f)
 			return true;
-				
+
 		// for all gecko based browsers
 		if (getBrowserVersion(userAgentStr, ".*rv:([\\d]+.[\\d]+).*") > 1.7f)
 			return true;
-		
+
 		// Opera 9.5+
 		if (getBrowserVersion(userAgentStr, "opera/([\\d]+.[\\d]+).*") >= 9.5f
@@ -69,10 +71,14 @@
 
 	/**
-	 * Just a wrapper to {@link #check(String)}.
+	 * Checks browser compatibility by reading its user-agent header from the
+	 * request.
 	 * 
+	 * @see #check(String)
 	 * @param request
+	 *            current user request instance
 	 */
 	public static boolean isCompatibleBrowser(final HttpServletRequest request) {
-		return (request == null) ? false : check(request.getHeader("user-agent"));
+		return (request == null) ? false : check(request
+				.getHeader("user-agent"));
 	}
 
@@ -85,5 +91,6 @@
 	 * @return The browser version, or -1f if version can't be determined.
 	 */
-	private static float getBrowserVersion(final String userAgent, final String regex) {
+	private static float getBrowserVersion(final String userAgent,
+			final String regex) {
 		Pattern pattern = Pattern.compile(regex);
 		Matcher matcher = pattern.matcher(userAgent);
Index: /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/Utils.java
===================================================================
--- /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/Utils.java	(revision 3357)
+++ /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/Utils.java	(revision 3358)
@@ -33,11 +33,12 @@
 
 	/**
-	 * Constructs a set of uppercased strings from a delimiter-separated string.
+	 * Constructs a set of lower-cased strings from a delimiter-separated
+	 * string.
 	 * 
 	 * @param stringList
+	 *            string separated with a delimiter
 	 * @param delimiter
-	 *            The delimiter.
-	 * @return An empty list if 'stringList' is empty else a lowercased set of
-	 *         strings.
+	 *            separating delimiter
+	 * @return a lower-cased set, empty set if stringList is empty
 	 * @throws IllegalArgumentException
 	 *             if 'delimiter' is empty.
@@ -62,6 +63,13 @@
 
 	/**
-	 * Just a wrapper to {@link #getSet(String, String)} for using '&#124;' as
-	 * delimiter.
+	 * Constructs a set of lower-cased strings from a <code>|</code> (pipe)
+	 * delimited string.
+	 * 
+	 * @see #getSet(String, String)
+	 * @param stringList
+	 *            string separated with a delimiter
+	 * @return a lower-cased set, empty set if stringList is empty
+	 * @throws IllegalArgumentException
+	 *             if 'delimiter' is empty.
 	 */
 	public static Set<String> getSet(final String stringList) {
@@ -70,10 +78,9 @@
 
 	/**
-	 * Checks if a string is <code>null</code> or empty.
+	 * Checks if a string is <code>null</code> or empty (length zero).
 	 * 
 	 * @param str
-	 *            to check
-	 * @return <code>true</code> if the string is <code>null</code> or
-	 *         empty.
+	 *            string to check
+	 * @return <code>true</code> if the string is <code>null</code> or empty.
 	 */
 	public static boolean isEmpty(final String str) {
@@ -82,9 +89,9 @@
 
 	/**
-	 * Just a wrapper to {@link #isEmpty(String)}.
+	 * Inverts return value of {@link #isEmpty(String)}.
 	 * 
 	 * @param str
-	 *            to ckeck
-	 * @return <code>true</code> if the String is not empty or not
+	 *            string to check
+	 * @return <code>true</code> if the string is not empty or not
 	 *         <code>null</code>.
 	 */
@@ -94,10 +101,12 @@
 
 	/**
-	 * Checks if a String is whitespace, empty or null.
+	 * Checks if a string is empty or contains whitespace only.<br />
+	 * This method calls {@link #isEmpty(String)} first and then checks the
+	 * string with {@link Character#isWhitespace(char)}.
 	 * 
 	 * @param str
-	 *            to check
-	 * @return <code>true</code> if the string is <code>null</code>, empty
-	 *         or contains whitespace only.
+	 *            string to check
+	 * @return <code>true</code> if the string is <code>null</code>, empty or
+	 *         contains whitespace only.
 	 */
 	public static boolean isBlank(final String str) {
@@ -115,10 +124,10 @@
 
 	/**
-	 * Just a wrapper to {@link #isBlank(String)}.
+	 * Inverts return value of {@link #isBlank(String)}.
 	 * 
 	 * @param str
-	 *            to check
-	 * @return <code>true</code> if the string is not <code>null</code>,
-	 *         not empty or does not contain whitespace only.
+	 *            string to check
+	 * @return <code>true</code> if the string is not <code>null</code>, not
+	 *         empty or does not contain whitespace only.
 	 */
 	public static boolean isNotBlank(final String str) {
Index: /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/UtilsFile.java
===================================================================
--- /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/UtilsFile.java	(revision 3357)
+++ /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/UtilsFile.java	(revision 3358)
@@ -31,81 +31,90 @@
 /**
  * Some static helper methods in conjunction with files.
- *
+ * 
  * @version $Id$
  */
 public class UtilsFile {
-	
-	/**
-	 * Do a cleanup of the file name to avoid possible problems.<br>
-	 * The <code>forceSingleExtension<code> property will be respected!
-	 * 
-	 * @param fileName
-	 * @return folder name where \ / | : ? * &quot; &lt; &gt; 'control chars' replaced by '_'
-	 */
-    public static String sanitizeFileName(final String fileName) {
-    	if (fileName == null)
-    		return null;
-    	if (fileName.equals(""))
-    		return "";
-    
-    	String name = (PropertiesLoader.isForceSingleExtension()) ? UtilsFile
-				.forceSingleExtension(fileName) : fileName;
-    
-    	// Remove \ / | : ? * " < > 'Control Chars' with _
-    	return name.replaceAll("\\\\|/|\\||:|\\?|\\*|\"|<|>|\\p{Cntrl}", "_");
-    }
 
 	/**
-	 * Do a cleanup of the folder name to avoid possible problems.
+	 * Sanitizes a filename from certain chars.<br />
+	 * 
+	 * This method enforces the <code>forceSingleExtension</code> property and
+	 * then replaces all occurrences of \, /, |, :, ?, *, &quot;, &lt;, &gt;,
+	 * control chars by _ (underscore).
+	 * 
+	 * @param filename
+	 *            a potentially 'malicious' filename
+	 * @return sanitized filename
+	 */
+	public static String sanitizeFileName(final String filename) {
+
+		if (Utils.isEmpty(filename))
+			return filename;
+
+		String name = (PropertiesLoader.isForceSingleExtension()) ? UtilsFile
+				.forceSingleExtension(filename) : filename;
+
+		// Remove \ / | : ? * " < > 'Control Chars' with _
+		return name.replaceAll("\\\\|/|\\||:|\\?|\\*|\"|<|>|\\p{Cntrl}", "_");
+	}
+
+	/**
+	 * Sanitizes a folder name from certain chars.<br />
+	 * 
+	 * This method replaces all occurrences of \, /, |, :, ?, *, &quot;, &lt;,
+	 * &gt;, control chars by _ (underscore).
 	 * 
 	 * @param folderName
-	 * @return folder name where . \ / | : ? * &quot; &lt; &gt; 'control chars'
-	 *         replaced by '_'
+	 *            a potentially 'malicious' folder name
+	 * @return sanitized folder name
 	 */
-    public static String sanitizeFolderName(final String folderName) {
-    	if (folderName == null)
-    		return null;
-    	if (folderName.equals(""))
-    		return "";
-    
-    	// Remove . \ / | : ? * " < > 'Control Chars' with _
-    	return folderName.replaceAll("\\.|\\\\|/|\\||:|\\?|\\*|\"|<|>|\\p{Cntrl}", "_");
-    }
+	public static String sanitizeFolderName(final String folderName) {
+
+		if (Utils.isEmpty(folderName))
+			return folderName;
+
+		// Remove . \ / | : ? * " < > 'Control Chars' with _
+		return folderName.replaceAll(
+				"\\.|\\\\|/|\\||:|\\?|\\*|\"|<|>|\\p{Cntrl}", "_");
+	}
 
 	/**
-	 * Checks if the underlying file of the InputStream is an image.
+	 * Checks if the underlying input stream contains an image.
 	 * 
-	 * @param in An input stream
-	 * @return <code>true</code> if the underlying file is an image else
+	 * @param in
+	 *            input stream of an image
+	 * @return <code>true</code> if the underlying input stream contains an
+	 *         image else <code>false</code>.
+	 */
+	public static boolean isImage(final InputStream in) {
+		ImageInfo ii = new ImageInfo();
+		ii.setInput(in);
+		return ii.check();
+	}
+
+	/**
+	 * Checks whether a path complied the FCKeditor File Browser rules.<br/>
+	 * In particular a path has to comply with these <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Server_Side_Integration#File_Browser_Requests"
+	 * >rules</a>.
+	 * 
+	 * @param path
+	 *            a potentially 'malicious' path
+	 * @return <code>true</code> if path complies to the rules else
 	 *         <code>false</code>.
 	 */
-	public static boolean isImage(final InputStream in) {
-    	ImageInfo ii = new ImageInfo();
-    	ii.setInput(in);
-    	return ii.check();
-    }
+	public static boolean isValidPath(final String path) {
+		if (Utils.isEmpty(path))
+			return false;
+		if (!path.startsWith("/"))
+			return false;
+		if (!path.endsWith("/"))
+			return false;
 
-	/**
-	 * Checks if a path corresponds to the rules defined <a
-	 * href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Server_Side_Integration#File_Browser_Requests">here</a>.
-	 * 
-	 * @param path
-	 * @return <code>true</code> if path corresponds to rules or
-	 *         <code>false</code>.
-	 */
-    public static boolean isValidPath(final String path) {
-    	if (Utils.isEmpty(path))
-    		return false;
-    	if (!path.startsWith("/"))
-    		return false;
-    	if (!path.endsWith("/"))
-    		return false;
-    	
-    	if (!path.equals(FilenameUtils.separatorsToUnix(FilenameUtils
-    			.normalize(path))))
-    		return false;
-    	
-    	return true;
-    }
+		if (!path.equals(FilenameUtils.separatorsToUnix(FilenameUtils
+				.normalize(path))))
+			return false;
+
+		return true;
+	}
 
 	/**
@@ -113,25 +122,27 @@
 	 * 
 	 * @param filename
+	 *            filename to sanitize
 	 * @return string with a single dot only
 	 */
-    public static String forceSingleExtension(final String filename) {
-    	return filename.replaceAll("\\.(?![^.]+$)", "_");
-    }
+	public static String forceSingleExtension(final String filename) {
+		return filename.replaceAll("\\.(?![^.]+$)", "_");
+	}
 
 	/**
-     * Checks if a filename contains more than one dot.
-     * 
-     * @param filename
-     * @return <code>true</code> if filename contains severals dots else
-     *         <code>false</code>
-     */
-    public static boolean isSingleExtension(final String filename) {
-    	return filename.matches("[^\\.]+\\.[^\\.]+");
-    }
-    
-    /**
-	 * Checks for a dir and creates it if it does not exist.
+	 * Checks if a filename contains more than one dot.
 	 * 
-	 * @param dir Directory to check/create.
+	 * @param filename
+	 * @return <code>true</code> if filename contains severals dots else
+	 *         <code>false</code>
+	 */
+	public static boolean isSingleExtension(final String filename) {
+		return filename.matches("[^\\.]+\\.[^\\.]+");
+	}
+
+	/**
+	 * Checks a directory for existence and creates it if non-existent.
+	 * 
+	 * @param dir
+	 *            Directory to check/create.
 	 */
 	public static void checkDirAndCreate(File dir) {
@@ -141,17 +152,17 @@
 
 	/**
-	 * Ensures 'file' is a unique one. <br>
-	 * If 'file' already exists, it will be renamed by using the following
-	 * pattern: <code>basename(count).ext</code>. For example, if the 'file' is
-	 * named "Test.doc", the names to be used, in order, are: "Test(1).doc",
-	 * "Test(2).doc", Test(3).doc"... and so on.
+	 * Iterates over a base name and returns the first non-existent file.<br />
+	 * This method extracts a file's base name, iterates over it until the first
+	 * non-existent appearance with <code>basename(n).ext</code>. Where n is a
+	 * positive integer starting from one.
 	 * 
 	 * @param file
-	 * @return Unique file.
+	 *            base file
+	 * @return first non-existent file
 	 */
 	public static File getUniqueFile(final File file) {
 		if (!file.exists())
 			return file;
-		
+
 		File tmpFile = new File(file.getAbsolutePath());
 		File parentDir = tmpFile.getParentFile();
@@ -160,5 +171,6 @@
 		String baseName = FilenameUtils.getBaseName(tmpFile.getName());
 		do {
-			tmpFile = new File(parentDir, baseName + "(" + count++ + ")." + extension);
+			tmpFile = new File(parentDir, baseName + "(" + count++ + ")."
+					+ extension);
 		} while (tmpFile.exists());
 		return tmpFile;
Index: /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/UtilsResponse.java
===================================================================
--- /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/UtilsResponse.java	(revision 3357)
+++ /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/UtilsResponse.java	(revision 3358)
@@ -30,4 +30,10 @@
 public class UtilsResponse {
 
+	/**
+	 * Assembles a URL with omitted filename.
+	 * 
+	 * @see #fileUrl(String, ResourceType, String, String)
+	 * 
+	 */
 	public static String getUrl(String userFilesPath, ResourceType type,
 			String currentFolder) {
@@ -35,9 +41,24 @@
 	}
 
+	/**
+	 * 
+	 * Assembles a file URL for the File Browser. Simply appends parameters to a
+	 * string buffer with reasonable parameter checking.
+	 * 
+	 * @param userFilesPath
+	 *            current userfiles path (may be null)
+	 * @param type
+	 *            current resource type
+	 * @param currentFolder
+	 *            selected current folder
+	 * @param filename
+	 *            current chosen file (may be null)
+	 * @return
+	 */
 	public static String fileUrl(String userFilesPath, ResourceType type,
 			String currentFolder, String filename) {
-		
+
 		StringBuffer sb = new StringBuffer();
-		if(Utils.isNotEmpty(userFilesPath))
+		if (Utils.isNotEmpty(userFilesPath))
 			sb.append(userFilesPath);
 		sb.append(type.getPath());
@@ -45,5 +66,5 @@
 		if (Utils.isNotEmpty(filename))
 			sb.append(filename);
-		
+
 		return sb.toString();
 	}
Index: /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/XHtmlTagTool.java
===================================================================
--- /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/XHtmlTagTool.java	(revision 3357)
+++ /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tool/XHtmlTagTool.java	(revision 3358)
@@ -25,7 +25,8 @@
 
 /**
- * Tool to construct a XHTML tag.<br>
+ * Java representation of an XHTML tag.<br />
  * <br>
  * Usage:
+ * 
  * <pre>
  * XHtmlTagTool tag = XHtmlTagTool(&quot;a&quot;, &quot;link&quot;);
@@ -34,9 +35,9 @@
  * </pre>
  * 
- * <em>Hint</em>:
+ * <em>Note</em>:
  * <ul>
  * <li>Attributes are not ordered.</li>
- * <li>If your tag shouldn't have a value but the tag has to close with '&lt;/[tagname]&gt;', set
- * the value to {@link XHtmlTagTool#SPACE}.</li>
+ * <li>If you want to avoid self-closing tags without supplying a value, set
+ * {@link #SPACE} as the tag's value.</li>
  * </ul>
  * 
@@ -52,24 +53,44 @@
 
 	/** Value of the tag. */
-	private String value = null;
-	
+	private String value;
+
 	/** Indicator to uses non self-closing tag. */
 	public static final String SPACE = " ";
 
+	/**
+	 * Class constructor with tag name.
+	 * 
+	 * @param name
+	 *            tag name
+	 * @throws IllegalArgumentException
+	 *             if name is empty
+	 */
+	public XHtmlTagTool(final String name) {
+		if (Utils.isEmpty(name))
+			throw new IllegalArgumentException(
+					"Parameter 'name' shouldn't be empty!");
+		this.name = name;
+	}
+
+	/**
+	 * Class constructor with name and value.
+	 * 
+	 * @param name
+	 *            tag name
+	 * @param value
+	 *            tag value which is the tag body
+	 * @throws IllegalArgumentException
+	 *             if name is empty
+	 */
 	public XHtmlTagTool(final String name, final String value) {
-		if (Utils.isEmpty(name))
-			throw new IllegalArgumentException("Parameter 'name' shouldn't be empty!");
-		this.name = name;
+		this(name);
 		this.value = value;
 	}
 
-	public XHtmlTagTool(final String name) {
-		this(name, null);
-	}
-
 	/**
-	 * Setter for the value of the tag.
+	 * Sets the tag value.
 	 * 
 	 * @param value
+	 *            tag value which is the tag body
 	 */
 	public void setValue(final String value) {
@@ -81,15 +102,19 @@
 	 * 
 	 * @param name
+	 *            attribute name
 	 * @param value
-	 * @throws IllegalArgumentException if 'key' is empty.
+	 *            attribute value
+	 * @throws IllegalArgumentException
+	 *             if 'name' is empty.
 	 */
 	public void addAttribute(final String name, final String value) {
 		if (Utils.isEmpty(name))
-			throw new IllegalArgumentException("Parameter 'name' shouldn't be empty!");
+			throw new IllegalArgumentException(
+					"Parameter 'name' shouldn't be empty!");
 		attributes.put(name, value);
 	}
 
 	/**
-	 * Constructs the tag.
+	 * Converts the tag to HTML.
 	 */
 	@Override
@@ -103,5 +128,6 @@
 		for (String key : attributes.keySet()) {
 			String val = attributes.get(key);
-			tag.append(' ').append(key).append('=').append('\"').append(val).append('\"');
+			tag.append(' ').append(key).append('=').append('\"').append(val)
+					.append('\"');
 		}
 
@@ -121,4 +147,5 @@
 		try {
 			XHtmlTagTool tag = (XHtmlTagTool) obj;
+			// FIXME potential NPE on value
 			return value.equals(tag.value) && name.equals(tag.name)
 					&& attributes.equals(tag.attributes);
@@ -127,8 +154,13 @@
 		}
 	}
-	
+
+	/**
+	 * The hash code is merely a sum of name's, value's, and attributes' hash
+	 * code.
+	 */
 	@Override
 	public int hashCode() {
-		
+
+		// FIXME potential NPE on value
 		return name.hashCode() + value.hashCode() + attributes.hashCode();
 	}
