Bug 162621

Summary: [model][delta] Validation errors do not clear after replacing jar file
Product: [Eclipse Project] JDT Reporter: Andrew Mak <makandre>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: clg-business, david_audel, jerome_lanneluc, mailmur, markus.kell.r, philippe_mulet, thorsten.waertel
Version: 3.2.1   
Target Milestone: 3.2.2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
project to reproduce this problem
none
Proposed patch
none
Proposed patch + completion test none

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. ***