You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2001/12/17 06:21:58 UTC

cvs commit: jakarta-tomcat/src/share/org/apache/jasper/runtime JspLoader.java

costin      01/12/16 21:21:58

  Modified:    src/share/org/apache/jasper/compiler JspUtil.java
                        Parser.java
               src/share/org/apache/jasper/runtime JspLoader.java
  Log:
  Few small changes, I've made them to be able to compile with gcj. The problem is that
  write() method is declared to throw an exception in a base class, but
  without the throw in a class the overrides it. My understanding of the JLS is that this
  is valid and the compiler should accept it ( as not throwing anything ), however gcj doesn't,
  and I'm not very sure I'm getting it right. In any case, catching it doesn't hurt anyone,
  but allow us to compile.
  
  Revision  Changes    Path
  1.21      +4 -1      jakarta-tomcat/src/share/org/apache/jasper/compiler/JspUtil.java
  
  Index: JspUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JspUtil.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- JspUtil.java	2001/01/07 19:24:19	1.20
  +++ JspUtil.java	2001/12/17 05:21:58	1.21
  @@ -68,7 +68,6 @@
   import org.apache.jasper.Constants;
   import org.apache.jasper.JasperException;
   
  -
   import org.w3c.dom.*;
   import javax.xml.parsers.DocumentBuilder;
   import javax.xml.parsers.DocumentBuilderFactory;
  @@ -91,6 +90,7 @@
   
       public static char[] removeQuotes(char []chars) {
   	CharArrayWriter caw = new CharArrayWriter();
  +	try {
   	for (int i = 0; i < chars.length; i++) {
   	    if (chars[i] == '%' && chars[i+1] == '\\' &&
   		chars[i+2] == '\\' && chars[i+3] == '>') {
  @@ -100,6 +100,7 @@
   	    }
   	    else caw.write(chars[i]);
   	}
  +	} catch( Exception ex ) {}
   	return caw.toCharArray();
       }
   
  @@ -158,11 +159,13 @@
   	    tld = builder.parse(in);
   	    return tld;
   	} catch( ParserConfigurationException ex ) {
  +	    ex.printStackTrace();
               throw new JasperException(Constants.
   				      getString("jsp.error.parse.error.in.TLD",
   						new Object[] {
   						    ex.getMessage()
   						}));
  +	    
   	} catch ( SAXException sx ) {
               throw new JasperException(Constants.
   				      getString("jsp.error.parse.error.in.TLD",
  
  
  
  1.29      +2 -0      jakarta-tomcat/src/share/org/apache/jasper/compiler/Parser.java
  
  Index: Parser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/Parser.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- Parser.java	2001/03/02 04:51:34	1.28
  +++ Parser.java	2001/12/17 05:21:58	1.29
  @@ -1095,7 +1095,9 @@
   		}
   		String s = reader.nextContent();
   		tmplStop = reader.mark();
  +		try {
   		caw.write(s, 0, s.length());
  +		}catch(Exception ex ) {}
   	    }
   	}
   	flushCharData(tmplStart, tmplStop);
  
  
  
  1.16      +1 -1      jakarta-tomcat/src/share/org/apache/jasper/runtime/JspLoader.java
  
  Index: JspLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspLoader.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- JspLoader.java	2001/03/02 04:51:40	1.15
  +++ JspLoader.java	2001/12/17 05:21:58	1.16
  @@ -119,7 +119,7 @@
           if (!jars.contains(jarFileName)) {
               Constants.message("jsp.message.adding_jar",
                                 new Object[] { jarFileName },
  -                              Log.INFORMATION);
  +                              Log.DEBUG);
               
               jars.addElement(jarFileName);
           }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>