cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp EsqlHelper.java
Date Tue, 14 May 2002 12:16:08 GMT
tcurdt      02/05/14 05:16:08

  Modified:    src/java/org/apache/cocoon/components/language/markup/xsp/java
                        esql.xsl
               src/java/org/apache/cocoon/components/language/markup/xsp
                        EsqlHelper.java
  Log:
  reverted some changes that broke some esql usecases.
  The encoding stuff should be done in the EsqlHelper.
  
  Revision  Changes    Path
  1.20      +2 -4      xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl
  
  Index: esql.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- esql.xsl	7 May 2002 08:08:29 -0000	1.19
  +++ esql.xsl	14 May 2002 12:16:08 -0000	1.20
  @@ -1,6 +1,6 @@
   <?xml version="1.0"?>
   
  -<!-- $Id: esql.xsl,v 1.19 2002/05/07 08:08:29 haul Exp $-->
  +<!-- $Id: esql.xsl,v 1.20 2002/05/14 12:16:08 tcurdt Exp $-->
   <!--
   
    ============================================================================
  @@ -56,7 +56,7 @@
    * ESQL Logicsheet
    *
    * @author ?
  - * @version CVS $Revision: 1.19 $ $Date: 2002/05/07 08:08:29 $
  + * @version CVS $Revision: 1.20 $ $Date: 2002/05/14 12:16:08 $
   -->
   
   <xsl:stylesheet version="1.0"
  @@ -1063,8 +1063,6 @@
         <xsl:otherwise>default</xsl:otherwise>
       </xsl:choose>
     </xsl:variable>
  -  <xsl:value-of select="$resultset"/>.getBytes(<xsl:value-of select="$column-spec"/>)
  -      == null ? "<xsl:value-of select="$null"/>" :
     <xsl:choose>
       <xsl:when test="$encoding = 'default'">
         <xsl:value-of select="$resultset"/>.getString(<xsl:value-of select="$column-spec"/>)
  
  
  
  1.8       +10 -5     xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/EsqlHelper.java
  
  Index: EsqlHelper.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/EsqlHelper.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- EsqlHelper.java	22 Feb 2002 07:00:08 -0000	1.7
  +++ EsqlHelper.java	14 May 2002 12:16:08 -0000	1.8
  @@ -61,7 +61,7 @@
    *
    * based on the orginal esql.xsl
    * @author <a href="mailto:tcurdt@dff.st">Torsten Curdt</a>
  - * @version CVS $Id: EsqlHelper.java,v 1.7 2002/02/22 07:00:08 cziegeler Exp $
  + * @version CVS $Id: EsqlHelper.java,v 1.8 2002/05/14 12:16:08 tcurdt Exp $
    */
   
   public class EsqlHelper {
  @@ -115,10 +115,15 @@
         }
   
         public final static String getStringFromByteArray(byte[] bytes, String encoding)
{
  -        try {
  -            return new String(bytes,encoding);
  -        } catch (java.io.UnsupportedEncodingException uee) {
  -            throw new RuntimeException("Unsupported Encoding Exception: " + uee.getMessage());
  +        if (bytes != null) {
  +            try {
  +                return new String(bytes,encoding);
  +            } catch (java.io.UnsupportedEncodingException uee) {
  +                throw new RuntimeException("Unsupported Encoding Exception: " + uee.getMessage());
  +            }
  +        }
  +        else {
  +            return("");
           }
         }
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message