Hi Vadim,
On Fri, 29 Jun 2001, Vadim Gritsenko wrote:
> Just one quick question: does this patch breaks backward compatibility,
> or not? I could apply it stright away if I would know that it does not break
> anything :)
:-)
I've just tested it on my system (Debian GNU/Linux i386 unstable) with
Jikes 1.13 and 1.14 and everything works fine. What versions were
people previously using ? Perhaps we should document which versions of
Jikes we support ?
> PS: Especially line
> + if (line.length() == 0) {
> because IIRC line can be null on the end of stream...
Yes, good point. Attached is an updated diff with a check for null.
Thanks for your email and feedback mate. Much appreciated. :-)
Cheers,
Marcus
--
.....
,,$$$$$$$$$, Marcus Crafter
;$' '$$$$: Computer Systems Engineer
$: $$$$: Open Software Associates GmbH
$ o_)$$$: 82-84 Mainzer Landstrasse
;$, _/\ &&:' 60327 Frankfurt Germany
' /( &&&
\_&&&&' Email : [EMAIL PROTECTED]
&&&&. Business Hours : +49 69 9757 200
&&&&&&&: After Hours : +49 69 49086750
Index: Jikes.java
===================================================================
RCS file:
/home/cvspublic/xml-cocoon2/src/org/apache/cocoon/components/language/programming/java/Jikes.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Jikes.java
--- Jikes.java 2001/05/09 20:49:57 1.1.1.1
+++ Jikes.java 2001/07/02 12:08:01
@@ -176,7 +176,10 @@
// all other space-starting lines are one error
while (true) {
line = input.readLine();
- if ((line == null) || (line.charAt(0) != ' ')) break;
+ if (line == null || line.length() == 0) {
+ line = null;
+ break;
+ }
buffer.append(line);
buffer.append('\n');
}
@@ -211,14 +214,19 @@
endline = Integer.parseInt(tokens.nextToken());
endcolumn = Integer.parseInt(tokens.nextToken());
} catch (Exception e) {
- message = "Please make sure you have your JDK's rt.jar file in the
classpath. Jikes needs it to opperate.";
+ message = "Please ensure that you have your JDK's rt.jar listed in your
+classpath. Jikes needs it to operate.";
type="error";
getLogger().error(message, e);
}
- if (! "".equals(message)) {
+ if ("".equals(message)) {
type = tokens.nextToken().trim().toLowerCase();
message = tokens.nextToken().trim();
+ message += "\n";
+ if (tokens.hasMoreTokens()) {
+ while (tokens.hasMoreTokens())
+ message += tokens.nextToken();
+ }
}
return new CompilerError(file, type.equals("error"), startline, startcolumn,
endline, endcolumn, message);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]