tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arieh Markel <Arieh.Mar...@Central.Sun.COM>
Subject Problem with latest build ? - proposed PATCH to jasper.compiler.Compiler
Date Tue, 25 Apr 2000 18:42:28 GMT
I have just downloaded the latest build (20000425).

Following instructions found in a posting in which Sam Ruby explained
how the packages are built from source, I proceeded to follow, but
ran into the following while compiling the following:

/ws/sx1.0-tools/jakarta/v3.1_f/jakarta-tomcat/src/share/org/apache/jasper/compil
er/Compiler.java:312: Exception org.apache.jasper.compiler.ParseException must 
be caught, or it must be declared in the throws clause of this method.
        while (tmpReader.skipUntil("<%@") != null) {
                                  ^
Note: 
/ws/sx1.0-tools/jakarta/v3.1_f/jakarta-tomcat/src/share/org/apache/tomcat/util/x
ml/XmlMapper.java uses or overrides a deprecated API.  Recompile with 
"-deprecation" for details.
1 error, 1 warning
BUILD FATAL ERROR: Compile failed, messages should have been provided.


Inspection of the code indicates that indeed, skipUntil throws the 
ParseException.


With the proposed patch that follows, I proceeded to complete the build
successfully.





===================================================================
RCS file: RCS/Compiler.java,v
retrieving revision 1.1
diff -u -b -r1.1 Compiler.java
--- Compiler.java	2000/04/25 18:33:47	1.1
+++ Compiler.java	2000/04/25 18:35:17
@@ -309,6 +309,8 @@
 
 	// A lot of code replicated from Parser.java
 	// Main aim is to "get-it-to-work".
+	try
+	{
 	while (tmpReader.skipUntil("<%@") != null) {
 
 	    tmpReader.skipSpaces();
@@ -336,6 +338,10 @@
 	    }
 	}
 	return null;
+	} catch (ParseException ex) {
+	    // Ignore the exception here, it will be caught later.
+	    return null;
+	}
     }
 }
 


Arieh
--
 Arieh Markel		                Sun Microsystems Inc.
 Network Storage                        500 Eldorado Blvd. MS UBRM11-194
 e-mail: arieh.markel@sun.COM           Broomfield, CO 80021
 Let's go Panthers !!!!                 Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)


Mime
View raw message