You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mb...@apache.org on 2005/10/28 09:34:17 UTC

svn commit: r329150 - /myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/util/AddResource.java

Author: mbr
Date: Fri Oct 28 00:34:12 2005
New Revision: 329150

URL: http://svn.apache.org/viewcvs?rev=329150&view=rev
Log:
response was rendered twice.

Modified:
    myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/util/AddResource.java

Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/util/AddResource.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/util/AddResource.java?rev=329150&r1=329149&r2=329150&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/util/AddResource.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/util/AddResource.java Fri Oct 28 00:34:12 2005
@@ -521,9 +521,8 @@
         if (headerInsertPosition >= 0 && addHeaderTags)
             writer.write("</head>");
 
-        writer
-                .write(headerInsertPosition > 0 ? originalResponse.substring(headerInsertPosition) : originalResponse
-                        .toString());
+        writer.write(headerInsertPosition > 0 ? originalResponse
+                .substring(headerInsertPosition) : originalResponse.toString());
         if (bodyInsertPosition > 0)
         {
             if (ADDITIONAL_JAVASCRIPT_TO_BODY_TAG != null)
@@ -531,9 +530,6 @@
                 originalResponse.insert( bodyInsertPosition + 5, ADDITIONAL_JAVASCRIPT_TO_BODY_TAG + "\"" );
             }
         }
-
-        writer.write( headerInsertPosition > 0 ?
-                originalResponse.substring(headerInsertPosition) : originalResponse.toString());
     }
 
     private HeaderInfo getStyleInstance(FacesContext context, ResourceHandler resourceHandler)