Index: /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/tool/Compatibility.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/tool/Compatibility.java	(revision 1762)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/tool/Compatibility.java	(revision 1763)
@@ -28,84 +28,80 @@
 /**
  * Compatibility check.
- *
+ * 
  * @version $Id$
  */
 public class Compatibility {
 
-    /**
-     * Checks, if a browser's user agent string is compatible for the FCKeditor. <br>
-     * Adapted from: http://dev.fckeditor.net/browser/FCKeditor/releases/stable/fckeditor.php
-     * 
-     * @param userAgentString
-     * @return true, if compatible
-     */
-    public static boolean check(final String userAgentString) {
-        if (userAgentString == null || userAgentString.length() < 1)
-            return false;
-    
-        float version;
-    
-        // IE 5.5+, check special keys like 'Opera' and 'mac', because there are some 
-        // other browsers, containing 'MSIE' in there agent string!
-        if (userAgentString.indexOf("Opera") < 0 && userAgentString.indexOf("mac") < 0) {
-            version = getBrowserVersion(userAgentString, ".*MSIE ([\\d]+.[\\d]+).*");
-            if (version != -1f && version >= 5.5f)
-        	return true;
-        }
-    
-        // for mozilla only, because all firefox versions are supported
-        version = getBrowserVersion(userAgentString, ".*Gecko/([\\d]+).*");
-        if (version != -1f && version >= 20030210f)
-            return true;
-    
-        // Opera 9.5+
-        version = getBrowserVersion(userAgentString, "Opera/([\\d]+.[\\d]+).*");
-        if (version != -1f && version >= 9.5f)
-            return true;
-        version = getBrowserVersion(userAgentString, ".*Opera ([\\d]+.[\\d]+)");
-        if (version != -1f && version >= 9.5f)
-            return true;
-    
-        // Safari 3+
-        version = getBrowserVersion(userAgentString, ".*AppleWebKit/([\\d]+).*");
-        if (version != -1f && version >= 522f)
-            return true;
-    
-        return false;
-    }
-    
-    /**
-     * Just a wrapper to {@link #check(String)}.
-     * 
-     * @param request
-     */
-    public static boolean isCompatibleBrowser(final HttpServletRequest request) {
-    	if (request == null)
-    		return false;
-    	return check(request.getHeader("user-agent"));
-    }
+	/**
+	 * Checks, if a browser's user agent string is compatible for the FCKeditor. <br>
+	 * Adapted from: http://dev.fckeditor.net/browser/FCKeditor/releases/stable/fckeditor.php
+	 * 
+	 * @param userAgentString
+	 * @return true, if compatible, otherwise false
+	 */
+	public static boolean check(final String userAgentString) {
+		if (Utils.isEmpty(userAgentString))
+			return false;
 
-    /**
-     * Helper method to get the the browser version from 'userAgent' with the
-     * regular expression 'regex'. The first group of the matches has to be the
-     * version number!
-     * 
-     * @param userAgent
-     * @param regex
-     * @return The browser version, or -1f
-     */
-    private static float getBrowserVersion(final String userAgent,
-            final String regex) {
-        Pattern pattern = Pattern.compile(regex);
-        Matcher matcher = pattern.matcher(userAgent);
-        if (matcher.matches()) {
-            try {
-        	return Float.parseFloat(matcher.group(1));
-            } catch (NumberFormatException e) {
-            	return -1f;
-            }
-        }
-        return -1f;
-    }
+		float version;
+
+		// IE 5.5+, check special keys like 'Opera' and 'mac', because there are some
+		// other browsers, containing 'MSIE' in there agent string!
+		if (userAgentString.indexOf("Opera") < 0 && userAgentString.indexOf("mac") < 0) {
+			version = getBrowserVersion(userAgentString, ".*MSIE ([\\d]+.[\\d]+).*");
+			if (version != -1f && version >= 5.5f)
+				return true;
+		}
+
+		// for mozilla only, because all firefox versions are supported
+		version = getBrowserVersion(userAgentString, ".*Gecko/([\\d]+).*");
+		if (version != -1f && version >= 20030210f)
+			return true;
+
+		// Opera 9.5+
+		version = getBrowserVersion(userAgentString, "Opera/([\\d]+.[\\d]+).*");
+		if (version != -1f && version >= 9.5f)
+			return true;
+		version = getBrowserVersion(userAgentString, ".*Opera ([\\d]+.[\\d]+)");
+		if (version != -1f && version >= 9.5f)
+			return true;
+
+		// Safari 3+
+		version = getBrowserVersion(userAgentString, ".*AppleWebKit/([\\d]+).*");
+		if (version != -1f && version >= 522f)
+			return true;
+
+		return false;
+	}
+
+	/**
+	 * Just a wrapper to {@link #check(String)}.
+	 * 
+	 * @param request
+	 */
+	public static boolean isCompatibleBrowser(final HttpServletRequest request) {
+		return (request == null) ? false : check(request.getHeader("user-agent"));
+	}
+
+	/**
+	 * Helper method to get the the browser version from 'userAgent' with the regular expression
+	 * 'regex'. The first group of the matches has to be the version number!
+	 * 
+	 * @param userAgent
+	 * @param regex
+	 * @return The browser version, or -1f, if version con't find out.
+	 */
+	private static float getBrowserVersion(final String userAgent, final String regex) {
+		Pattern pattern = Pattern.compile(regex);
+		Matcher matcher = pattern.matcher(userAgent);
+		if (matcher.matches()) {
+			try {
+				return Float.parseFloat(matcher.group(1));
+			} catch (NumberFormatException e) {
+				return -1f;
+			}
+		}
+		return -1f;
+	}
 
 }
