Re: cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler JDTCompiler.java
Jess Holle wrote: Despite advancements in speed, etc, the notion of Eclipse or Tomcat or anything else using it until it is both faster *and* as robust as javac is a bit strange. The notion that Eclipse depends upon it to the point that it's Java 5 support is held up by JDT development is particularly strange to me. javac is not a panacea but it support Java 5 quite nicely right now. [I'm using NetBeans 4, so I'm unaffected by Eclipse's move -- it just baffles me.] Cool, a new type of rant: the rant which one cannot actually understand :) At this point, I am still inverstigating what the issue is. Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler JDTCompiler.java
Despite advancements in speed, etc, the notion of Eclipse or Tomcat or anything else using it until it is both faster *and* as robust as javac is a bit strange. The notion that Eclipse depends upon it to the point that it's Java 5 support is held up by JDT development is particularly strange to me. javac is not a panacea but it support Java 5 quite nicely right now. [I'm using NetBeans 4, so I'm unaffected by Eclipse's move -- it just baffles me.] -- Jess Holle Remy Maucherat wrote: Tim Funk wrote: Is there a reason _jspx_dependants is a Vector - why not an ArrayList? This would remove the syncs inside of Vector. I don't know. It probably wouldn't hurt. It won't help me with my ECJ bug, however ;) Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler JDTCompiler.java
Tim Funk wrote: Is there a reason _jspx_dependants is a Vector - why not an ArrayList? This would remove the syncs inside of Vector. I don't know. It probably wouldn't hurt. It won't help me with my ECJ bug, however ;) Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler JDTCompiler.java
Is there a reason _jspx_dependants is a Vector - why not an ArrayList? This would remove the syncs inside of Vector. -Tim Remy Maucherat wrote: [EMAIL PROTECTED] wrote: remm2005/04/04 06:57:49 Modified:jasper2/src/share/org/apache/jasper EmbeddedServletOptions.java webapps/docs changelog.xml .build.properties.default jasper2/src/share/org/apache/jasper/compiler JDTCompiler.java Log: - Update to JDT 3.1 M6 (Java 5 feature complete, from what I have read). - Please test it (compilation on JDK 1.4 seems to work as usual) to see if this is ok or should be reverted. Cool, another one of my great ideas ;) At least there aren't any major regressions in JDK 1.4 mode. public final class test_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { private static java.util.Vector _jspx_dependants; public java.util.List getDependants() { return _jspx_dependants; } In JDK 1.5 mode, ECJ apparently doesn't like casting Vector -> List. This should be allowed, I think (javac works, from what I can tell). Can anyone confirm this problem ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler JDTCompiler.java
[EMAIL PROTECTED] wrote: remm2005/04/04 06:57:49 Modified:jasper2/src/share/org/apache/jasper EmbeddedServletOptions.java webapps/docs changelog.xml .build.properties.default jasper2/src/share/org/apache/jasper/compiler JDTCompiler.java Log: - Update to JDT 3.1 M6 (Java 5 feature complete, from what I have read). - Please test it (compilation on JDK 1.4 seems to work as usual) to see if this is ok or should be reverted. Cool, another one of my great ideas ;) At least there aren't any major regressions in JDK 1.4 mode. public final class test_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { private static java.util.Vector _jspx_dependants; public java.util.List getDependants() { return _jspx_dependants; } In JDK 1.5 mode, ECJ apparently doesn't like casting Vector -> List. This should be allowed, I think (javac works, from what I can tell). Can anyone confirm this problem ? Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler JDTCompiler.java
remm2005/04/04 06:57:49 Modified:jasper2/src/share/org/apache/jasper EmbeddedServletOptions.java webapps/docs changelog.xml .build.properties.default jasper2/src/share/org/apache/jasper/compiler JDTCompiler.java Log: - Update to JDT 3.1 M6 (Java 5 feature complete, from what I have read). - Please test it (compilation on JDK 1.4 seems to work as usual) to see if this is ok or should be reverted. Revision ChangesPath 1.22 +153 -142 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/EmbeddedServletOptions.java Index: EmbeddedServletOptions.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/EmbeddedServletOptions.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- EmbeddedServletOptions.java 21 Mar 2005 15:38:12 - 1.21 +++ EmbeddedServletOptions.java 4 Apr 2005 13:57:49 - 1.22 @@ -38,37 +38,37 @@ * @author Pierre Delisle */ public final class EmbeddedServletOptions implements Options { - + // Logger private Log log = LogFactory.getLog(EmbeddedServletOptions.class); - + private Properties settings = new Properties(); /** * Is Jasper being used in development mode? */ private boolean development = true; - + /** * Should Ant fork its java compiles of JSP pages. */ public boolean fork = true; - + /** * Do you want to keep the generated Java files around? */ private boolean keepGenerated = true; - + /** * Should white spaces between directives or actions be trimmed? */ private boolean trimSpaces = false; - + /** * Determines whether tag handler pooling is enabled. */ private boolean isPoolingEnabled = true; - + /** * Do you want support for "mapped" files? This will generate * servlet that has a print statement per line of the JSP file. @@ -82,34 +82,34 @@ * error or a log file if the standard error is redirected. */ private boolean sendErrorToClient = false; - + /** * Do we want to include debugging information in the class file? */ private boolean classDebugInfo = true; - + /** * Background compile thread check interval in seconds. */ private int checkInterval = 0; - + /** * Is the generation of SMAP info for JSR45 debuggin suppressed? */ private boolean isSmapSuppressed = false; - + /** * Should SMAP info for JSR45 debugging be dumped to a file? */ private boolean isSmapDumped = false; - + /** * Are Text strings to be generated as char arrays? */ private boolean genStringAsCharArray = false; - + private boolean errorOnUseBeanInvalidClassAttribute = true; - + /** * I want to see my generated servlets. Which directory are they * in? @@ -122,7 +122,7 @@ * to have a jsp initParam of type ieClassId="" */ private String ieClassId = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"; - + /** * What classpath should I use while compiling generated servlets? */ @@ -132,38 +132,38 @@ * Compiler to use. */ private String compiler = null; - + /** * Compiler target VM. */ -private String compilerTargetVM = "1.4"; - +private String compilerTargetVM = "1.5"; + /** * The compiler source VM. */ -private String compilerSourceVM = "1.4"; - +private String compilerSourceVM = "1.5"; + /** * Cache for the TLD locations */ private TldLocationsCache tldLocationsCache = null; - + /** * Jsp config information */ private JspConfig jspConfig = null; - + /** * TagPluginManager */ private TagPluginManager tagPluginManager = null; - + /** * Java platform encoding to generate the JSP * page servlet. */ private String javaEncoding = "UTF8"; - + /** * Modification test interval. */ @@ -173,11 +173,11 @@ * Is generation of X-Powered-By response header enabled/disabled? */ private boolean xpoweredBy; - + public String getProperty(String name ) { return settings.getProperty( name ); } - + public void setProperty(String name, String value ) { if (name != null && value != nu
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler JDTCompiler.java
remm2004/12/17 04:39:56 Modified:jasper2/src/share/org/apache/jasper/compiler JDTCompiler.java Log: - 32746: Close the input stream we get from getResourceAsStream. Revision ChangesPath 1.8 +10 -2 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JDTCompiler.java Index: JDTCompiler.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JDTCompiler.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- JDTCompiler.java 5 Oct 2004 19:06:31 - 1.7 +++ JDTCompiler.java 17 Dec 2004 12:39:55 - 1.8 @@ -185,6 +185,7 @@ private NameEnvironmentAnswer findType(String className) { +InputStream is = null; try { if (className.equals(targetClassName)) { ICompilationUnit compilationUnit = @@ -194,8 +195,7 @@ } String resourceName = className.replace('.', '/') + ".class"; -InputStream is = -classLoader.getResourceAsStream(resourceName); +is = classLoader.getResourceAsStream(resourceName); if (is != null) { byte[] classBytes; byte[] buf = new byte[8192]; @@ -218,6 +218,14 @@ log.error("Compilation error", exc); } catch (org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException exc) { log.error("Compilation error", exc); +} finally { +if (is != null) { +try { +is.close(); +} catch (IOException exc) { +// Ignore +} +} } return null; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler JDTCompiler.java
markt 2004/10/04 12:42:34 Modified:jasper2/src/share/org/apache/jasper/compiler JDTCompiler.java Log: Fix bug 31465. Ensure that the compiler reads the .java file using the same encoding as that with which it was written. Revision ChangesPath 1.5 +6 -2 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JDTCompiler.java Index: JDTCompiler.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JDTCompiler.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- JDTCompiler.java 9 Sep 2004 21:28:13 - 1.4 +++ JDTCompiler.java 4 Oct 2004 19:42:33 - 1.5 @@ -20,11 +20,12 @@ import java.io.BufferedReader; import java.io.ByteArrayOutputStream; import java.io.File; +import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; -import java.io.FileReader; import java.io.IOException; import java.io.InputStream; +import java.io.InputStreamReader; import java.io.Reader; import java.util.ArrayList; import java.util.HashMap; @@ -109,7 +110,10 @@ public char[] getContents() { char[] result = null; try { -Reader reader = new BufferedReader(new FileReader(sourceFile)); +InputStreamReader isReader = +new InputStreamReader(new FileInputStream(sourceFile), +ctxt.getOptions().getJavaEncoding()); +Reader reader = new BufferedReader(isReader); if (reader != null) { char[] chars = new char[8192]; StringBuffer buf = new StringBuffer(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler JDTCompiler.java
remm2004/09/02 09:28:07 Modified:jasper2/src/share/org/apache/jasper/compiler JDTCompiler.java Log: - Ignore warnings. They are reported as problems, and since there was no code separating errors from warnings (ex: the bad import warning for which Eclipse is known for ;) ), it was causing compilation to fail. Revision ChangesPath 1.3 +12 -9 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JDTCompiler.java Index: JDTCompiler.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JDTCompiler.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JDTCompiler.java 2 Sep 2004 16:05:06 - 1.2 +++ JDTCompiler.java 2 Sep 2004 16:28:07 - 1.3 @@ -314,17 +314,20 @@ IProblem[] problems = result.getProblems(); for (int i = 0; i < problems.length; i++) { IProblem problem = problems[i]; -String name = -new String(problems[i].getOriginatingFileName()); -try { -problemList.add(ErrorDispatcher.createJavacError -(name, pageNodes, new StringBuffer(problem.getMessage()), -problem.getSourceLineNumber())); -} catch (JasperException e) { -log.error("Error visiting node", e); +if (problem.isError()) { +String name = +new String(problems[i].getOriginatingFileName()); +try { + problemList.add(ErrorDispatcher.createJavacError +(name, pageNodes, new StringBuffer(problem.getMessage()), + problem.getSourceLineNumber())); +} catch (JasperException e) { +log.error("Error visiting node", e); +} } } -} else { +} +if (problemList.isEmpty()) { ClassFile[] classFiles = result.getClassFiles(); for (int i = 0; i < classFiles.length; i++) { ClassFile classFile = classFiles[i]; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]