You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by vv...@apache.org on 2010/04/08 15:58:45 UTC

svn commit: r931947 - /felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java

Author: vvalchev
Date: Thu Apr  8 13:58:45 2010
New Revision: 931947

URL: http://svn.apache.org/viewvc?rev=931947&view=rev
Log:
Fixed FELIX-2256 /Some small visual defects in the WebConsole/
https://issues.apache.org/jira/browse/FELIX-2256

Modified:
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java?rev=931947&r1=931946&r2=931947&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java Thu Apr  8 13:58:45 2010
@@ -709,7 +709,8 @@ public abstract class AbstractWebConsole
      * Note: This method is intended to be used internally by the Web Console
      * to update the log level according to the Web Console configuration.
      *
-     * @param logLevel
+     * @param logLevel the maximum allowed log level. If message is logged with 
+     *        lower level it will not be forwarded to the logger.
      */
     public static final void setLogLevel( int logLevel )
     {
@@ -778,7 +779,15 @@ public abstract class AbstractWebConsole
         {
             try
             {
-                return IOUtils.toString( templateStream, "UTF-8" );
+                String str = IOUtils.toString( templateStream, "UTF-8" );
+                switch ( str.charAt(0) )
+                { // skip BOM
+                    case 0xFEFF: // UTF-16/UTF-32, big-endian
+                    case 0xFFFE: // UTF-16, little-endian
+                    case 0xEFBB: // UTF-8
+                        return str.substring(1);
+                }
+                return str;
             }
             catch ( IOException e )
             {