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 29356 - BinaryFS doesn't behave like XMLFileSystem
Summary: BinaryFS doesn't behave like XMLFileSystem
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Module System (show other bugs)
Version: 3.x
Hardware: PC All
: P1 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on: 29382
Blocks: 20628
  Show dependency tree
 
Reported: 2002-12-06 13:45 UTC by Vitezslav Stejskal
Modified: 2008-12-23 08:38 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
patch for BinaryFS class (1.75 KB, patch)
2002-12-06 13:48 UTC, Vitezslav Stejskal
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vitezslav Stejskal 2002-12-06 13:45:10 UTC
If the XMLFileSystem is part of MultiFileSystem
and it is asked to get attribute value calling the
method which accepts FileObject as a parameter it
tries to pass the MultiFileObject to that method.
I know the implementation of this behavior is kind
of hack but it works and projects realy need it
(and if I can remember the Looks too).

The problem is that BinaryFS brakes this behavior.
I will attach patch fixing this problem. It's not
nice, but at least makes things work again.
Please, either apply the patch or fix this in some
other way. Thanks.
Comment 1 Vitezslav Stejskal 2002-12-06 13:48:52 UTC
Created attachment 8193 [details]
patch for BinaryFS class
Comment 2 Jesse Glick 2002-12-06 16:46:34 UTC
This will require a unit test too - whoever put in the original hack
did not bother to write a test for it.
Comment 3 Vitezslav Stejskal 2002-12-06 17:04:20 UTC
Hey, you caught me :-). Well, I'll write these tests. IMO two tests
are needed; first testing XMLFileSystem pluged into the
MultiFileSystem which will test that MFO is passed to method invoked
from methodvalue attribute implementation. Second test should be
written to ensure that this still works for module layer and
DefaultFileSystem. The first one should be quite easy, however I am
unclear how to write the second one. Could you advice me how to create
module just for test or how to plug layer into DFS from test?
Comment 4 Jesse Glick 2002-12-06 20:21:28 UTC
Don't worry, I managed to write such a test, and confirmed that it
passes for the binary cache manager if and only if your patch is
applied. I opened issue #29382 to try to get rid of this kind of
reflection stuff ASAP.

I patched CacheManagerTestBaseHid, meaning all cache manager impls are
tested, so this automatically tests XMLFileSystem (via
XMLLayerCacheManagerImpl and NonCacheManager) as well as BinaryFS.
Comment 5 Jesse Glick 2002-12-09 22:37:06 UTC
committed   * Up-To-Date  1.12       
core/src/org/netbeans/core/projects/FixedFileSystem.java
committed   * Up-To-Date  1.3        
core/src/org/netbeans/core/projects/cache/BinaryFS.java
committed   * Up-To-Date  1.2        
core/test/unit/src/org/netbeans/core/projects/cache/CacheManagerTestBaseHid.java
committed   * Up-To-Date  1.2        
core/test/unit/src/org/netbeans/core/projects/cache/data/layer1.xml