[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jedit-users
Subject:    Re: [ jEdit-users ] FTP/SFTP plug-in problems
From:       Slava Pestov <slava () jedit ! org>
Date:       2003-12-20 6:55:24
[Download RAW message or body]

There is a slightly better fix for this in CVS.

On Mon, 2003-12-15 at 22:17, Xephyrus wrote:
> Hi,
> 
> 
> If anybody is interested, here is a patch to fix the FTP/SFTP plug-in
> problem in the latest 4.2pre7.   My disclaimer: THIS MAY CAUSE OTHER
> PROBLEMS -- I don't know.  I'm not Slava.
> 
> All this does is modify the isURL method so that if null is passed in, it
> returns false rather than throwing a NPE.  (I figure it's a pretty safe
> bet that null is not a URL.)  *(`8
> 
> .  Topher
> 
> 
> *** MiscUtilities.java.old      2003-12-15 19:04:21.000000000 -0800
> --- MiscUtilities.java  2003-12-15 18:49:02.000000000 -0800
> *************** public class MiscUtilities
> *** 383,388 ****
> --- 383,390 ----
>          */
>         public static boolean isURL(String str)
>         {
> +               if (str == null)
> +                       return false;
>                 int fsIndex = Math.max(str.indexOf(File.separatorChar),
>                         str.indexOf('/'));
>                 if(fsIndex == 0) // /etc/passwd
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
> Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
-- 
Slava Pestov


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
-- 
-----------------------------------------------
jEdit Users' List
jEdit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic