cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francisco Jr. <>
Subject [C2] issues and Patch
Date Fri, 13 Oct 2000 23:56:23 GMT

Hi all,
I found some issues using Jikes compiler.
I'm using Jikes 1.12 08/01/2000
C2 10/12/2000 cvs Version.

--nowarn compiler switch isn't used anymore. It's now just -nowarn.
With --nowarn Jikes outputed a warning saying that this switch was not 
reconized and was throwing NumberFormatException when trying to read 
Emacs-format error messages from this warning.

I think that return evaluation of compile() should change.
Jikes return an exitValue of 1 on success and failure. And that was confusing 
Cocoon2 too. Even when Jikes compiled code successfully, C2 think taht there 
was an error. So I think that compile() return value shouldn't rely on it 
anymore. I think it can check just size of error buffer returned from Jikes if 
there is an error.

I think that Unix guys wouldn't have this problem :) To check errors, on parseError() creates a StringTokenizer with ':' as a separator. 
The problem is that in Windows the full name of file returned by Jikes includes 
drive letter information followed by ':' (i.e.: d:/ 
So you got the problem. Letter 'd' is returned as file name (first token) and 
''is the second token returned and at parserError, this second 
token is assumed to be the startline number. So I get NumberFormatException :(

I'm sending a patch to first and second issues. I'm think about third... The 
second token could be tested to see if it is a String or not, or could check 
operating system ( if (windows) append second token to first. ) I don't know... 
Maybe some of you could give a elegant solution to this :)

Thanks very much!

File: org/apache/cocoon/components/language/programming/java/

<         args.add("--nowarn");
>         args.add("-nowarn");
<         return ((exitValue == 0) && (tmpErr.size() > 0));
>         return (tmpErr.size() == 0);

Sorry for formating. My email client is a little crazy :)

Francisco Jr.

View raw message