commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util LoadTextTag.java
Date Wed, 01 Dec 2004 22:33:02 GMT
dion        2004/12/01 14:33:02

  Modified:    jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util
                        LoadTextTag.java
  Log:
  apply patch from stefan re: null encoding
  
  Revision  Changes    Path
  1.8       +9 -5      jakarta-commons/jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util/LoadTextTag.java
  
  Index: LoadTextTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util/LoadTextTag.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- LoadTextTag.java	12 Sep 2004 16:04:59 -0000	1.7
  +++ LoadTextTag.java	1 Dec 2004 22:33:02 -0000	1.8
  @@ -83,10 +83,14 @@
           }
   
           Reader reader = null;
  -        try {
  -            reader = new InputStreamReader(in, encoding);
  -        } catch (UnsupportedEncodingException e) {
  -            throw new JellyTagException("unsupported encoding",e);
  +        if (encoding != null) {
  +            try {
  +                reader = new InputStreamReader(in, encoding);
  +            } catch (UnsupportedEncodingException e) {
  +                throw new JellyTagException("unsupported encoding",e);
  +            }
  +        } else {
  +            reader = new InputStreamReader(in);
           }
   
           String text = null;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message