Author: toad
Date: 2009-01-06 21:55:00 +0000 (Tue, 06 Jan 2009)
New Revision: 24944

Modified:
   trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
Log:
Fix NPE filtering external link in unit test.


Modified: 
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
===================================================================
--- 
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java    
    2009-01-06 21:46:25 UTC (rev 24943)
+++ 
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java    
    2009-01-06 21:55:00 UTC (rev 24944)
@@ -180,11 +180,12 @@
                        
                        rpath = resolved.getPath();
                        
+                       if(rpath == null) reason = "No URI";
+                       else {
                        if(rpath.startsWith(StaticToadlet.ROOT_URL)) {
                                return fixer.fixLink(rpath);
                        }
                        
-                       if(rpath == null) throw new CommentException("No URI");
                        if(logMINOR) Logger.minor(this, "Resolved URI (rpath 
relative): "+rpath);
                        
                        // Valid FreenetURI?
@@ -202,7 +203,8 @@
                                        reason = 
l10n("couldNotParseRelativeFreenetURI");
                                }
                        }
-               
+                       
+                       }
                }
                
                
if(GenericReadFilterCallback.allowedProtocols.contains(uri.getScheme()))

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to