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 199641 - DefaultDataObject.fixCookieSet() reads file content too early
Summary: DefaultDataObject.fixCookieSet() reads file content too early
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 7.0.1
Hardware: PC All
: P3 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: PERFORMANCE
Depends on: 199642
Blocks:
  Show dependency tree
 
Reported: 2011-06-23 06:44 UTC by Alexander Simon
Modified: 2012-05-14 07:05 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
An attempt to base the editorcookie presence just on mimetype (7.76 KB, patch)
2011-06-30 06:48 UTC, Jaroslav Tulach
Details | Diff
call stack of fixing cookies set for file with undefined MIME type (file name: names.rl) (3.99 KB, text/plain)
2012-05-14 07:05 UTC, Alexander Simon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2011-06-23 06:44:32 UTC
File object has method "getMIMEType()". This method called at mime resolving time. But file system does not delegate mime resolving to file object in two cases.

First: MIMESupport.CachedFileObject does not call "getMIMEType()" for delegated file object.

Second: DefaultDataObject.fixCookieSet() use first 2048 bytes of file object for implicit "text" mime resolving. This implicit mime resolving should be moved at mime resolving time or called just before editing file object.

This is requirements of remote file system.
Comment 1 Jaroslav Tulach 2011-06-23 09:24:11 UTC
I've reported the FileUtil.getMIMEType problem as bug 199642 (at the same moment you reported this one). Let's track the problem there and let use this bug for the fixCookieSet problem.
Comment 2 Jaroslav Tulach 2011-06-27 09:34:03 UTC
As far as I can tell, the fixCookieSet is called only when you select the DefaultDataObject - e.g. it is not called while the DDO is being displayed.
Comment 3 Jaroslav Tulach 2011-06-30 06:48:26 UTC
Created attachment 109159 [details]
An attempt to base the editorcookie presence just on mimetype
Comment 4 Jaroslav Tulach 2012-05-13 18:32:28 UTC
Does this still remain a problem? If so, please reopen.
Comment 5 Marian Mirilovic 2012-05-13 20:49:58 UTC
(In reply to comment #4)
> Does this still remain a problem? If so, please reopen.

.. and WONTFIX ?
Comment 6 Alexander Simon 2012-05-14 07:03:34 UTC
Second problem still exists.
Method DefaultDataObject.fixCookieSet() is called when node is shown in favorites tree.
Comment 7 Alexander Simon 2012-05-14 07:05:30 UTC
Created attachment 119398 [details]
call stack of fixing cookies set for file with undefined MIME type (file name: names.rl)