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 23065 - DataObject.find returns data object which is not valid
Summary: DataObject.find returns data object which is not valid
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 3.x
Hardware: All Solaris
: P2 blocker (vote)
Assignee: phamernik
URL:
Keywords: THREAD
Depends on:
Blocks: 24586 24687
  Show dependency tree
 
Reported: 2002-05-02 22:41 UTC by Chris Webster
Modified: 2008-12-23 10:49 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Java File demonstrating the problem (1.11 KB, text/plain)
2002-05-02 22:41 UTC, Chris Webster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Webster 2002-05-02 22:41:08 UTC
I am attaching a test case which demonstrates the
problem when executing on FFJ 4.0 fcs (NB 3.3.2).
The basic problem is the following code will
sometimes return an invalid data object.
DataObject dobj = // get data object;
FileObject fo = dobj.getPrimaryFile();
dobj.setValid(false);
DataObject ido = DataObject.find(fo);
// sometimes
ido.isValid() == false;
Comment 1 Chris Webster 2002-05-02 22:41:56 UTC
Created attachment 5630 [details]
Java File demonstrating the problem
Comment 2 Chris Webster 2002-05-02 22:44:46 UTC
In order to demonstrate this bug do the following using the attached
file.
1. mount or create directory containing this java file, this may
require adjusting the class path.
2. add another file jdotest_1.java to the same directory or adjust the
FileObject.find statement to refer to a compiled java file.
3. Use Internal compilation and execution.
4. If the finding statement appears in the output window this means
that DataObject.find has returned an invalid data object and the bug
has been triggered.
Comment 3 mslama 2002-06-12 10:07:51 UTC
Increasing priority it causes problem in winsys when opening new
project. I will try workaround not to chack DO validity after it is
created but it can be potentialy dangerous because it can hide another
problems.

In winsys we just create primary file and use DataObject.find().
Returned DO is not valid sometimes.

Reproducible with currect dev build 20020211. Start new IDE open any
txt file and open new project. Problem appears on Solaris, JDK
1.4.0-b92 quite often. (Not always.) I can provide more info where it
happens in our code. Result is that we throw FileNotFoundException.
Comment 4 phamernik 2002-06-18 09:25:25 UTC
Fixed in trunk. I am going to add the test to /openide/test/

Chris, thanks for the excelent bug report.
Comment 5 pzajac 2003-07-05 10:30:26 UTC
[200307040100]verified