JDK-5050807 : Funny error message
  • Type: Bug
  • Component: tools
  • Sub-Component: apt
  • Affected Version: 5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux,solaris_9,windows_2000
  • CPU: generic,x86,sparc
  • Submitted: 2004-05-21
  • Updated: 2004-06-25
  • Resolved: 2004-06-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b58Fixed
Related Reports
Duplicate :  
Relates :  
Description

Name: ss24420			Date: 05/20/2004



Here's a bad (very bad) java source file:

	% cat A.java
	A

Here's how javac handles it:

	% javac A.java
	A.java:1: 'class' or 'interface' expected
	A
	^
	1 error

Fair enough.  Here's how apt handles it:

	% apt -print A.java
	__input:1: 'class' or 'interface' expected
	(source unavailable)

======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-rc FIXED IN: tiger-rc INTEGRATED IN: tiger-b58 tiger-rc
17-07-2004

EVALUATION apt's JavaCompiler.parse method does this: Name prev = bark.useSource(names.fromString(filename)); but it fails to also do something equivalent to this: Name prev = log.useSource(names.fromString(filename)); It looks like apt-generated errors are handled, but not javac-generated errors that go out via Log. The right fix may be for Bark.useSource to invoke Log.useSource before returning. ###@###.### 2004-05-20
20-05-2004