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 60898 - IllegalArgumentException from handleFindDataObject shown to the user
Summary: IllegalArgumentException from handleFindDataObject shown to the user
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: PDF (show other bugs)
Version: 5.x
Hardware: All Linux
: P3 blocker (vote)
Assignee: Marian Petras
URL:
Keywords: THREAD
Depends on:
Blocks:
 
Reported: 2005-07-12 21:58 UTC by David Strupl
Modified: 2005-09-05 10:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Strupl 2005-07-12 21:58:26 UTC
Hi, not sure whether this should go to pdf or loaders. Feel free to reassign.
Steps to reproduce:

NetBeans IDE Dev (Build 200507110943)

1. Open Favorites for say /tmp
2. put a temporary PDF file there (by another program not netbeans)
3. look at the favorites tab with /tmp expanded
4. make the other program (not netbeans) delete the temporary pdf file

This exception is shown to the user in the dev build:

java.io.IOException: java.lang.IllegalArgumentException: The /tmp/TK.2005.pdf
file does not exist.
	at org.openide.loaders.DataLoader.findDataObject(DataLoader.java:373)
	at org.openide.loaders.DataLoaderPool.findDataObject(DataLoaderPool.java:386)
	at org.openide.loaders.FolderList.createBoth(FolderList.java:701)
	at org.openide.loaders.FolderList.access$600(FolderList.java:50)
	at org.openide.loaders.FolderList$2.run(FolderList.java:334)
	at org.openide.util.Task.run(Task.java:207)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:469)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:870)
==>
java.lang.IllegalArgumentException: The /tmp/TK.2005.pdf file does not exist.
	at org.netbeans.modules.pdf.PDFOpenSupport.<init>(PDFOpenSupport.java:49)
	at org.netbeans.modules.pdf.PDFDataObject.<init>(PDFDataObject.java:40)
	at org.netbeans.modules.pdf.PDFDataLoader.createMultiObject(PDFDataLoader.java:87)
	at
org.openide.loaders.MultiFileLoader.handleFindDataObject(MultiFileLoader.java:73)
	at org.openide.loaders.DataObjectPool.handleFindDataObject(DataObjectPool.java:111)
	at org.openide.loaders.DataLoader.findDataObject(DataLoader.java:358)
	at org.openide.loaders.DataLoaderPool.findDataObject(DataLoaderPool.java:386)
	at org.openide.loaders.FolderList.createBoth(FolderList.java:701)
	at org.openide.loaders.FolderList.access$600(FolderList.java:50)
	at org.openide.loaders.FolderList$2.run(FolderList.java:334)
	at org.openide.util.Task.run(Task.java:207)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:469)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:870)
Comment 1 Jaroslav Tulach 2005-07-13 08:43:16 UTC
If you are not sure, then try the same behaviour with other types of files. If   it is reproducible with only pdf, assign to that module. openide is not  trashcan for your made up issues. 
Comment 2 Marian Petras 2005-07-18 11:41:07 UTC
Confirmed, accepted.

I guess this may happen if the file is deleted during the time the data loader
creates a data object for the file. I am not able to reproduce it but I believe
it may happen.
Comment 3 Marian Petras 2005-07-18 13:59:28 UTC
Fixed in the trunk.

I removed the part of code which performed the check and thrown the exception.
The check was unnecessary.

Modified files:
     utilities/src/org/netbeans/modules/pdf/:
                                      PDFOpenSupport.java   (1.12)
                                      Bundle.properties   (1.13)

Diffs:
http://utilities.netbeans.org/source/browse/utilities/src/org/netbeans/modules/pdf/PDFOpenSupport.java?r1=1.11&r2=1.12&diff_format=u
http://utilities.netbeans.org/source/browse/utilities/src/org/netbeans/modules/pdf/Bundle.properties?r1=1.12&r2=1.13&diff_format=u