Bug 73497 - Problem methods don't point to the right position in source
Summary: Problem methods don't point to the right position in source
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0.2   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-08 17:20 EDT by Olivier Thomann CLA
Modified: 2005-01-26 16:28 EST (History)
0 users

See Also:


Attachments
Test case (724 bytes, text/plain)
2004-09-08 17:20 EDT, Olivier Thomann CLA
no flags Details
Apply on HEAD on ClassFile (1.13 KB, patch)
2004-09-08 18:48 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2004-09-08 17:20:28 EDT
Using latest in HEAD, when the number of problems per compilation unit is lower
than the number of errors in the compilation unit, a problem method doesn't seem
to have the right error inside.

Try to compile the attached source file and run it as a Java application. You
will get the following error in the console:

java.lang.Error: Unresolved compilation problem: 
	at Example.foo10(Example.java:3)
	at Example.main(Example.java:53)
Exception in thread "main" 

instead of a good error with the right line. Line 3 is the first problem.
Comment 1 Olivier Thomann CLA 2004-09-08 17:20:56 EDT
Created attachment 14452 [details]
Test case
Comment 2 Olivier Thomann CLA 2004-09-08 17:21:25 EDT
I will investigate.
Comment 3 Olivier Thomann CLA 2004-09-08 17:35:10 EDT
It is worse than that. The line is always the line of the first problem inside
the first problem method.
Comment 4 Olivier Thomann CLA 2004-09-08 17:35:48 EDT
I will attach a patch later tonight.
Comment 5 Olivier Thomann CLA 2004-09-08 17:36:02 EDT
We might want to backport for 3.0.1.
Comment 6 Olivier Thomann CLA 2004-09-08 18:48:46 EDT
Created attachment 14453 [details]
Apply on HEAD on ClassFile

I will annotate the PR if all tests are passing with this change. I will also
add a regression test.
Comment 7 Olivier Thomann CLA 2004-09-08 19:05:26 EDT
I tested the patch on a small example and it works well.
I am running all the tests.
Comment 8 Olivier Thomann CLA 2004-09-08 19:36:35 EDT
All tests passed.
I am releasing the fix. I will add a regression test in HEAD.
Do you want to backport to 3.0.1?
Comment 9 Philipe Mulet CLA 2004-09-09 03:07:43 EDT
Too late for 3.0.1, maybe a later update.
Comment 10 Olivier Thomann CLA 2004-09-09 13:10:23 EDT
Fixed and released in HEAD.
Comment 11 Philipe Mulet CLA 2004-09-10 04:51:18 EDT
Could be backported for 3.0.2
Comment 12 Olivier Thomann CLA 2004-09-21 18:00:11 EDT
Backported in 3.0.2.
Comment 13 Frederic Fusier CLA 2004-09-24 05:25:59 EDT
Verified for 3.1 M2 with build I200409231635.

Note that target have to be modified when fix will be backported for 3.0.2 into
R3_0_maintenance stream...
Comment 14 Philipe Mulet CLA 2005-01-26 16:28:46 EST
Candidating for 3.0.2 release (not committed yet)