Comment 7 for bug 981037

Revision history for this message
In , Mike (mike-redhat-bugs) wrote :

Description of problem:

The latest version of javac produces error messages that no longer display the full path of the file containing the errors. This means that the error message no longer unambiguously identifies the offending file as soon as there is a collision in the leaf file names in a java project.

Version-Release number of selected component (if applicable):

java-1.6.0-openjdk-devel-1.6.0.0-63.1.11.fc16.*

How reproducible:

Always.

Steps to Reproduce:
1. mkdir tmp; echo "bar" > tmp/foo.java
2. javac tmp/foo.java

Actual results:

foo.java:1: reached end of file while parsing
bar
^
1 error

Expected results:

tmp/foo.java:1: reached end of file while parsing
bar
^
1 error

Additional info:

java-1.6.0-openjdk-devel-1.6.0.0-59.1.10.3.fc16.* produces the expected result above, so for now, yum downgrade allows me to work around this problem. Not a long term solution of course. A better workaround would be if there is a command line option to restore the full path, but I was unable to find any.

There are two reasons this is really a bug and not just a cosmetic issue.

1. I have to deal with some medium-to-large Java projects where the leaf file names are far from unique. Indeed there are some places where there is a directory containing subdirectories which in turn contain files with standardized identical names (50+ and growing of them). The old error message unambiguously identified the broken file. The new one leaves me guessing.
Changing the naming convention is outside my area of responsibility, its `other people's code'.

2. This kills any possibility for an editor to parse the error messages and bring up the offending source/line. Please understand that not everybody uses eclipse!

IMHO the best solution to this problem is to revert the change.

See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=638805