cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/components/language/programming/java Jikes.java
Date Fri, 27 Apr 2001 14:46:57 GMT
bloritsch    01/04/27 07:46:57

  Modified:    src/org/apache/cocoon/components/language/programming/java
                        Tag: xml-cocoon2 Jikes.java
  Log:
  Fix for parsing logic--it fails too hard if rt.jar is not in the classpath.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.13  +22 -5     xml-cocoon/src/org/apache/cocoon/components/language/programming/java/Attic/Jikes.java
  
  Index: Jikes.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/programming/java/Attic/Jikes.java,v
  retrieving revision 1.1.2.12
  retrieving revision 1.1.2.13
  diff -u -r1.1.2.12 -r1.1.2.13
  --- Jikes.java	2001/04/25 21:02:02	1.1.2.12
  +++ Jikes.java	2001/04/27 14:46:56	1.1.2.13
  @@ -25,7 +25,7 @@
    * This class wraps IBM's <i>Jikes</i> Java compiler
    * NOTE: inspired by the Apache Jasper implementation.
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version $Revision: 1.1.2.12 $ $Date: 2001/04/25 21:02:02 $
  + * @version $Revision: 1.1.2.13 $ $Date: 2001/04/27 14:46:56 $
    * @since 2.0
    */
   
  @@ -198,10 +198,27 @@
       private CompilerError parseError(String error) {
           StringTokenizer tokens = new StringTokenizer(error, ":");
           String file = tokens.nextToken();
  -        int startline = Integer.parseInt(tokens.nextToken());
  -        int startcolumn = Integer.parseInt(tokens.nextToken());
  -        int endline = Integer.parseInt(tokens.nextToken());
  -        int endcolumn = Integer.parseInt(tokens.nextToken());
  +        String sl = tokens.nextToken();
  +        String sc = tokens.nextToken();
  +        String el = tokens.nextToken();
  +        String ec = tokens.nextToken();
  +        int startline = 0;
  +        int startcolumn = 0;
  +        int endline = 0;
  +        int endcolumn = 0;
  +
  +        try {
  +            startline = Integer.parseInt(sl);
  +            startcolumn = Integer.parseInt(sc);
  +            endline = Integer.parseInt(el);
  +            endcolumn = Integer.parseInt(ec);
  +        } catch (Exception e) {
  +            getLogger().debug("Start Line: " + sl, e);
  +            getLogger().debug("Start Column: " + sc, e);
  +            getLogger().debug("End Line: " + el, e);
  +            getLogger().debug("End Column: " + ec, e);
  +        }
  +
           String type = tokens.nextToken().trim().toLowerCase();
           String message = tokens.nextToken().trim();
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message