costin      01/06/16 14:40:59

  Modified:    util/java/org/apache/tomcat/util/buf MessageBytes.java
  Log:
  Added extra method to MessageBytes to reset the cached string value,
  if the byte[] is changed.
  
  Revision  Changes    Path
  1.4       +8 -0      
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/MessageBytes.java
  
  Index: MessageBytes.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/buf/MessageBytes.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MessageBytes.java 2001/06/15 17:05:09     1.3
  +++ MessageBytes.java 2001/06/16 21:40:59     1.4
  @@ -161,6 +161,14 @@
        type=T_CHARS;
       }
   
  +    /** Remove the cached string value. Use it after a conversion on the
  +     byte[] or after the encoding is changed
  +    */
  +    public void resetStringValue() {
  +     hasStrValue=false;
  +     strValue=null;
  +    }
  +
       public void setString( String s ) {
        recycle();
           if (s == null)
  
  
  

Reply via email to