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.
Product Version = NetBeans IDE 7.2 (Build 201207171143) Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.7.0_09 Runtime = Java HotSpot(TM) 64-Bit Server VM 23.5-b02 I dowloaded a set of filed from the FTP server. However the downloading program (WinSCP 5.1.1 build 2735) set to the all downloaded files the date/time 1970-01-01 - 01:00:00). NetBeans don't want to show content of such files (see the attached screenshot). After changing the file dates/times the editor started to work.
Created attachment 128571 [details] Screenshot showing the descripted behavior
Nothing to do with PHP, reassigning... Thanks.
BTW I am not sure about the proper BZ component. Please evaluate, thanks.
It looks the files are corrupted. Did you open files with other editors?
(In reply to comment #4) > It looks the files are corrupted. Did you open files with other editors? I was first wondered what happen and so I opened the file with another editor (PSPad). When i discovered that it is readable, I opened the Total Commander and set the file date to today. Then everything started to work. So i tried to set to date of a file to 1.1.1970 01:00 in TotalCommander by hand and problems with editihg this file in NB again appeared. I am afraid that NB don't like, when the date/file field of file is set to zero. JEdit opened the file without problems, so it seems that it is not a Java problem.
Reproducible touch -d 'Jan 1 1970 1:00:00' JavaApplication1.java I got same as it is in the screenshot above. I can open file with Notepad.jar. Product Version: NetBeans IDE Dev (Build 201211270002) Updates: Updates available to version , NetBeans 7.3 Beta 2 Java: 1.7.0_09; Java HotSpot(TM) 64-Bit Server VM 23.5-b02 Runtime: Java(TM) SE Runtime Environment 1.7.0_09-b05 System: Linux version 3.0.0-28-generic running on amd64; UTF-8; en_US (nb)
When CloneableEditorSupport.loadDocument() calls InputStream is = new BufferedInputStream(cesEnv().inputStream()); the MultiDataObject.getFile() returns a file that has file.isValid() == false. This is likely due to impl of FileObj.isValid(): @Override public boolean isValid() { //0 - because java.io.File.lastModififed returns 0 for not existing files boolean retval = getLastModified() != 0; //assert checkCacheState(retval, getFileName().getFile()); return retval && super.isValid(); } Reassigning to filesystems.
Sad result of using getLastModified() to check if the file exists or not. Anyway this is not the case to optimize for and the fix is easy. Making P4.
*** This bug has been marked as a duplicate of bug 254567 ***