View | Details | Raw Unified | Return to bug 320340 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java (-2 / +5 lines)
Lines 1065-1071 Link Here
1065
		if (encoding == null) {
1065
		if (encoding == null) {
1066
			encoding = System.getProperty("file.encoding"); //$NON-NLS-1$
1066
			encoding = System.getProperty("file.encoding"); //$NON-NLS-1$
1067
		}
1067
		}
1068
		String[] arguments = new String[]{ fileName, encoding, };
1068
		String[] arguments = new String[]{ fileName, encoding };
1069
		this.handle(
1069
		this.handle(
1070
				IProblem.InvalidEncoding,
1070
				IProblem.InvalidEncoding,
1071
				arguments,
1071
				arguments,
Lines 1078-1090 Link Here
1078
	PrintWriter writer = new PrintWriter(stringWriter);
1078
	PrintWriter writer = new PrintWriter(stringWriter);
1079
	if (verbose) {
1079
	if (verbose) {
1080
		abortException.exception.printStackTrace(writer);
1080
		abortException.exception.printStackTrace(writer);
1081
		System.err.println(stringWriter.toString());
1082
		stringWriter = new StringWriter();
1083
		writer = new PrintWriter(stringWriter);
1081
	} else {
1084
	} else {
1082
		writer.print(abortException.exception.getClass().getName());
1085
		writer.print(abortException.exception.getClass().getName());
1083
		writer.print(':');
1086
		writer.print(':');
1084
		writer.print(abortException.exception.getMessage());
1087
		writer.print(abortException.exception.getMessage());
1085
	}
1088
	}
1086
	String exceptionTrace = stringWriter.toString();
1089
	String exceptionTrace = stringWriter.toString();
1087
	String[] arguments = new String[]{ fileName, exceptionTrace, };
1090
	String[] arguments = new String[]{ fileName, exceptionTrace };
1088
	this.handle(
1091
	this.handle(
1089
			IProblem.CannotReadSource,
1092
			IProblem.CannotReadSource,
1090
			arguments,
1093
			arguments,
(-)formatter/org/eclipse/jdt/internal/formatter/Scribe.java (-2 / +4 lines)
Lines 1174-1181 Link Here
1174
							linePtr = -linePtr - 1;
1174
							linePtr = -linePtr - 1;
1175
						}
1175
						}
1176
						int i = getLineEnd(linePtr)+1;
1176
						int i = getLineEnd(linePtr)+1;
1177
						while (this.scanner.source[i] != '\r') {
1177
						char[] source = this.scanner.source;
1178
							System.out.print(this.scanner.source[i++]);
1178
						int sourceLength = source.length;
1179
						while (i < sourceLength && source[i] != '\r') {
1180
							System.out.print(source[i++]);
1179
						}
1181
						}
1180
						System.out.println();
1182
						System.out.println();
1181
						System.out.println(" - indentation level = "+this.indentationLevel); //$NON-NLS-1$
1183
						System.out.println(" - indentation level = "+this.indentationLevel); //$NON-NLS-1$

Return to bug 320340