This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 16245 - Files are not properly replaced in layers
Summary: Files are not properly replaced in layers
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 3.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: rmatous
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-04 17:53 UTC by Jan Lahoda
Modified: 2008-12-22 21:57 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Example (bug.tar.gz) (2.45 KB, application/octet-stream)
2001-10-04 18:45 UTC, Jan Lahoda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2001-10-04 17:53:27 UTC
Consider two modules, both defining the same file in XML layer.
One depending on other (#2 depends on #1).
In 3.2.1, file defined by #1 is "replaced" by that defined by #2. That means,
file from #1 is not visible at all and file from #2 is properly visible.
This is not true in 3.3, build 200110030100.
There are these files concated together. 
I am attaching example modules:
In archive are source (manifests and xml layers) and both modules jar.
Follow these steps:
1. Run on clean IDE.
2. Shutdown it.
3. Copy both jar from attachment to modules directory on you testing nbuser
4. run IDE again.
5. Look to Default FileSystem/cpplite/test.txt

Perform on 3.2.1 (98) and 3.3 (200110030100). Your will see behaviour described
above. I consider this to be compatibility issue (as old modules may not work).
Comment 1 Jan Lahoda 2001-10-04 18:27:46 UTC
Only corrected summary.
Comment 2 Jan Lahoda 2001-10-04 18:45:00 UTC
Created attachment 2852 [details]
Example (bug.tar.gz)
Comment 3 Petr Nejedly 2001-10-04 23:31:49 UTC
Caused by fix for #14794

The fix for this problem still preserving the fix for #14794
is to clear the content of the previous file if the new
file of the same name is created, like in
XMLFS.RssourceElem.addChild():
@@ -425,6 +424,7 @@
             if (retVal != null) {
               children.put(name,retVal);              
               retVal.urlContext.addAll
(Arrays.asList(child.getUrlContext ()));
+              retVal.content=null;
             } else retVal = child;
             return retVal;
         }
Comment 4 Svata Dedic 2001-10-05 08:17:35 UTC
Please also see an (maybe related) issue #16219
Comment 5 rmatous 2001-10-05 09:41:39 UTC
Fixed in trunk. Thanks Petr.
Comment 6 Jan Lahoda 2001-10-05 09:53:55 UTC
Only for reference, this bug also occurs in 200110050100.
Comment 7 Petr Nejedly 2001-10-08 10:12:18 UTC
> Please also see an (maybe related) issue #16219

IMHO it can't be related. This is only about inlined contents
(not <file url=...) and only inside single XMLFS, not between
several XMLFSs in MFS.

>Only for reference, this bug also occurs in 200110050100.
Honzo, could you please verify the fix on newer build?
Comment 8 Jan Lahoda 2001-10-08 11:10:12 UTC
I tested 200110080100, and it works OK. Tested via attached example
and CPPLite.
Comment 9 Quality Engineering 2003-07-01 16:20:13 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.