tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler JDTCompiler.java
Date Thu, 02 Sep 2004 16:28:07 GMT
remm        2004/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  Changes    Path
  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 -0000	1.2
  +++ JDTCompiler.java	2 Sep 2004 16:28:07 -0000	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: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message