Bug 162621 - [model][delta] Validation errors do not clear after replacing jar file
Summary: [model][delta] Validation errors do not clear after replacing jar file
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.2.2   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 161631 161719 163935 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-10-27 16:15 EDT by Andrew Mak CLA
Modified: 2007-03-28 09:01 EDT (History)
7 users (show)

See Also:


Attachments
project to reproduce this problem (2.20 KB, application/octet-stream)
2006-10-27 16:25 EDT, Andrew Mak CLA
no flags Details
Proposed patch (4.57 KB, patch)
2006-11-09 09:48 EST, Frederic Fusier CLA
no flags Details | Diff
Proposed patch + completion test (8.56 KB, patch)
2006-11-09 10:58 EST, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Mak CLA 2006-10-27 16:15:20 EDT
I have a java project which is using some class from a jar file (i.e. test.before.Foo in foo.jar).  In a newer version of the jar file, the package name has changed to test.after.Foo.  I replaced the the old jar file with the new version and update the references in my project.  The project builds successfully, however, in the java editor it still shows that test.after.Foo cannot be resolved. The validation errors goes away only after I close and re-open the project.

I'll attach a simple project which can be used to reproduce this problem.
Comment 1 Andrew Mak CLA 2006-10-27 16:25:18 EDT
Created attachment 52885 [details]
project to reproduce this problem

To reproduce:
=============
1. Import project into workspace. Open the Test.java file.
2. Comment out the line "import test.before.Foo;" and uncomment "import test.after.Foo;".  Save the file.  As expected, there is a compilation error (test.after.Foo cannot be resolved).
3. Now copy the new foo.jar from the lib_not_in_classpath folder, and replace the foo.jar in the lib folder.
4. The red Xs in the package-explorer disappears.  Also, expanding foo.jar will show the correct test.after.Foo class.  There are no entries in the Problems view either.
5. However, in the editor the validation errors are still present.  Closing and re-opening Test.java does not help, nor does a clean/re-build.
Comment 2 Frederic Fusier CLA 2006-11-08 08:01:09 EST
Reproduced. DeltaProcessor does not generate delta in this case. I'll investigate...
Comment 3 Frederic Fusier CLA 2006-11-09 09:48:37 EST
Created attachment 53543 [details]
Proposed patch
Comment 4 Frederic Fusier CLA 2006-11-09 09:49:35 EST
Philippe, I think it's a good candidate for 3.2.2...
Comment 5 Frederic Fusier CLA 2006-11-09 09:51:44 EST
*** Bug 163935 has been marked as a duplicate of this bug. ***
Comment 6 Frederic Fusier CLA 2006-11-09 10:58:35 EST
Created attachment 53548 [details]
Proposed patch + completion test

Same fix + regression test for duplicate bug 163935 (thanks David for help)
Comment 7 Frederic Fusier CLA 2006-11-09 13:04:28 EST
Released for 3.3 M4 in HEAD stream.
Comment 8 Philipe Mulet CLA 2006-11-10 04:34:54 EST
+1 for 3.2.2
Comment 9 Frederic Fusier CLA 2006-11-10 04:38:22 EST
Reopen to backport in R3_2_maintenance stream
Comment 10 Frederic Fusier CLA 2006-11-10 04:42:21 EST
Released for 3.2.2 in R3_2_maintenance stream.
Comment 11 David Audel CLA 2006-12-12 05:13:47 EST
Verified for 3.3M4 with I20061212-0010.
Comment 12 Konstantin Komissarchik CLA 2007-01-08 12:24:46 EST
*** Bug 161631 has been marked as a duplicate of this bug. ***
Comment 13 Frederic Fusier CLA 2007-01-11 09:47:09 EST
*** Bug 161719 has been marked as a duplicate of this bug. ***
Comment 14 David Audel CLA 2007-01-15 12:22:14 EST
Verified for 3.2.2 using build M20070112-1200
Comment 15 Maxime Daniel CLA 2007-03-28 09:01:09 EDT
*** Bug 174833 has been marked as a duplicate of this bug. ***