Bug 789154 - javac error messages no longer contain the full path to the offending file
javac error messages no longer contain the full path to the offending file
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: java-1.6.0-openjdk (Show other bugs)
16
All All
unspecified Severity medium
: ---
: ---
Assigned To: Pavel Tisnovsky
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-09 18:36 EST by Mike Pope
Modified: 2012-10-19 13:20 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-19 13:20:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike Pope 2012-02-09 18:36:22 EST
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
Comment 1 Deepak Bhole 2012-03-27 16:13:09 EDT
Assigning to Pavel.

Pavel, I looked into the issue and it looks like it is being caused due to this patch:
http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-March/013178.html

Can you please take a look when you have time?
Comment 2 Andrew John Hughes 2012-03-28 08:51:26 EDT
Hmmm, as I recall, that patch was introduced specifically to fix this problem.  But indeed, testing with 1.11 suggests it doesn't.

I'll check if removing the patch makes HEAD's behave match 7.  If so, I'll commit the change.
Comment 3 Andrew John Hughes 2012-03-28 12:34:55 EDT
Indeed, removing the patch does give the same behaviour as in previous releases, including not only 1.10, but 1.9 and 1.8.  I was under the impression that this patch was added because 1.10 (to which it was going to be backported, but seemingly never was) changed the behaviour, compared to other releases.  But these results suggest not.

Let's see what Pavel has to say.  I think there was a TCK issue involved, which may since have been excluded, so some of this may have to happen internally.
Comment 5 Andrew John Hughes 2012-03-29 05:38:44 EDT
For the benefit of public users, Pavel confirmed that the TCK issues surrounding this patch have been resolved through other means so the patch can be dropped.

Pavel, can you remove the patch from HEAD and the 1.11 branch?  I'll approve on the mailing list.  Thanks.
Comment 6 Pavel Tisnovsky 2012-03-29 08:02:05 EDT
Of course, I'll do it. Thank you.
Comment 7 Andrew John Hughes 2012-03-29 10:20:02 EDT
Thanks Pavel.

Note You need to log in before you can comment on or make changes to this bug.