Hello,
If I attempt to connect to an FTP server via jEdit, there seems to be a problem with broken symlinks. If for some reason the symlink on the server points to a non-existent directory, jEdit throws a NumberFormatException. This exception is thrown because jEdit is trying to parse the response as if it were a line containing info about the symlink contents. Unfortunately, the FTP server is returning a line that says the file does not exist instead of the file info. This is causing jEdit to throw a NFE when it trys to parse size info about the file. Below is the error that gets generated within the Activity Log. I realize that file systems should not have broken symlinks, but I would imagine encountering broken symlinks will probably be a common occurance. By the way, I am using jEdit 2.6pre3 / jdk1.3 / Winnt. This setup also applies to File - Save As Bug (112465) , I have already reported.
Scott
[error] WorkThread: Exception in work thread:
[error] WorkThread: java.lang.NumberFormatException: or
[error] WorkThread: at java.lang.Long.parseLong(Long.java:310)
[error] WorkThread: at java.lang.Long.parseLong(Long.java:363)
[error] WorkThread: at org.gjt.sp.jedit.io.FtpVFS.lineToDirectoryEntry(FtpVFS.java:509)
[error] WorkThread: at org.gjt.sp.jedit.io.FtpVFS._getDirectoryEntry(FtpVFS.java:294)
[error] WorkThread: at org.gjt.sp.jedit.io.FtpVFS.resolveSymlink(FtpVFS.java:535)
[error] WorkThread: at org.gjt.sp.jedit.io.FtpVFS._listDirectory(FtpVFS.java:167)
[error] WorkThread: at org.gjt.sp.jedit.browser.BrowserIORequest.listDirectory(BrowserIORequest.java:140)
[error] WorkThread: at org.gjt.sp.jedit.browser.BrowserIORequest.run(BrowserIORequest.java:79)
[error] WorkThread: at org.gjt.sp.util.WorkThread.doRequest(WorkThread.java:193)
[error] WorkThread: at org.gjt.sp.util.WorkThread.doRequests(WorkThread.java:160)
[error] WorkThread: at org.gjt.sp.util.WorkThread.run(WorkThread.java:134)
Although broken symlinks just cause _getDirectoryEntry() to return null for me, I *think* I've fixed the problem by wrapping lineToDirectoryEntry() in a try/catch statement. Give it a go with 2.6pre4 when it is released and tell me if that fixes the problem.