myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1296311 - /myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java
Date Fri, 02 Mar 2012 17:13:44 GMT
Author: lu4242
Date: Fri Mar  2 17:13:44 2012
New Revision: 1296311

URL: http://svn.apache.org/viewvc?rev=1296311&view=rev
Log:
MYFACES-3475 [perf] Improve performance of HtmlResponseWriterImpl constructor (Thanks to Martin
Koci for provide this patch)

Modified:
    myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java

Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java?rev=1296311&r1=1296310&r2=1296311&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java
(original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java
Fri Mar  2 17:13:44 2012
@@ -19,7 +19,6 @@
 package org.apache.myfaces.shared.renderkit.html;
 
 import java.io.IOException;
-import java.io.UnsupportedEncodingException;
 import java.io.Writer;
 import java.util.HashSet;
 import java.util.Set;
@@ -177,16 +176,6 @@ public class HtmlResponseWriterImpl
         }
         else
         {
-            // validates the encoding, it will throw an UnsupportedEncodingException if the
encoding is invalid
-            try
-            {
-                new String("myfaces".getBytes(), characterEncoding);
-            }
-            catch (UnsupportedEncodingException e)
-            {
-                throw new IllegalArgumentException("Unsupported encoding: "+characterEncoding);
-            }
-            
             // canonize to uppercase, that's the standard format
             _characterEncoding = characterEncoding.toUpperCase();
         }



Mime
View raw message