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 48221

Summary: warning pops up about a text file being binary
Product: platform Reporter: Patrick Keegan <pkeegan>
Component: Data SystemsAssignee: David Konecny <dkonecny>
Status: CLOSED FIXED    
Severity: blocker CC: jtulach
Priority: P3 Keywords: SIMPLEFIX
Version: 4.x   
Hardware: PC   
OS: Windows ME/2000   
Issue Type: DEFECT Exception Reporter:
Attachments: file that IDE thinks is binary

Description Patrick Keegan 2004-08-31 11:27:14 UTC
When opening up some JavaHelp metadata, a warning
pops up saying that the file might be binary when
it fairly clearly is not.
Comment 1 Patrick Keegan 2004-08-31 11:28:24 UTC
Created attachment 17239 [details]
file that  IDE thinks is binary
Comment 2 Petr Nejedly 2004-09-01 15:51:06 UTC
The heuristic for recognizing binary file is implemented in
DefaultDataObject.

The problematic character is the copyright sign, but the heuristic is
probably meant to accept it.

The problem is the test at line 184: "arr[i] < 9", which is true for
character codes 0-8 but also for characters above 128 (like (c)).
I thing the intention was to accept everything above code 8.

reassigning to DS and also ccing Yarda (after using blametool on the
source file ;-)
Comment 3 David Konecny 2004-09-02 10:57:46 UTC
Fixed in:
loaders/src/org/openide/loaders/DefaultDataObject.java;
new revision: 1.4; previous revision: 1.3
test/unit/src/org/openide/loaders/DefautDataObjectHasOpenTest.java;
new revision: 1.3; previous revision: 1.2
Comment 4 Marian Mirilovic 2005-12-20 15:50:52 UTC
This issue was solved long time ago. Because nobody has reopened it neither
added comments, we are verifying/closing it now. 
If you are still able to reproduce the problem, please reopen. Thanks in advance.