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.
Summary: | Test: fo.getChildren() may not contain FO for broken symlinks | ||
---|---|---|---|
Product: | platform | Reporter: | Ondrej Vrabec <ovrabec> |
Component: | Filesystems | Assignee: | Jaroslav Tulach <jtulach> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ovrabec |
Priority: | P3 | ||
Version: | 7.3 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 222841 | ||
Attachments: |
test
tests still failing |
Description
Ondrej Vrabec
2012-12-03 11:50:47 UTC
currently a blocker of #222841 but if you tell me it cannot be fixed i will try to workaround it. There seems to be a workaround that you can use: http://hg.netbeans.org/ergonomics/rev/ee37515e3a9a On JDK7 I could: use Files.isSymbolicLink, but I am not sure how to make the code work also on JDK6. sorry jardo, my fault, i gave this a wrong description. My point was different: my problem is that ProvidedExtensions does not receive events about such files - because FileObject cannot be created for these files in FileObjectFactory.java. I'll try harder and write a different more descriptive test. Created attachment 128902 [details]
tests still failing
i modified the tests to demonstrate my point please see the attachment: 1) FileObjTest - true, first time it passes but once you delete the broken link, refresh and create it again, it does not seem to return FileObject for it again 2) ProvidedExtensionsTest.testCreatedDeleteBrokenLinkExternally - fist sequence of create/delete delivers the events fine, but the following sequence of create/delete of the same broken link fails FileObject can be created, if you ask parent for getChildren(). Take a look at my test. Integrated into 'main-golden', will be available in build *201212120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/ee37515e3a9a User: Jaroslav Tulach <jtulach@netbeans.org> Log: #223167: Demonstrating that getParent().getChildren() works and makes the broken symlink available ergonomics#5b551493d8cc Integrated into 'main-golden', will be available in build *201212170919* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/5b551493d8cc User: Jaroslav Tulach <jtulach@netbeans.org> Log: #223167: Test: FileUtil.toFileObject() returns null for broken symlinks #223167: Indicating the issueIfExists that the file has been noticed during listFiles() and thus it exists whatever its exist() state says |