Return-Path: Delivered-To: apmail-forrest-svn-archive@www.apache.org Received: (qmail 1045 invoked from network); 10 Jun 2005 13:31:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Jun 2005 13:31:08 -0000 Received: (qmail 66469 invoked by uid 500); 10 Jun 2005 13:31:08 -0000 Delivered-To: apmail-forrest-svn-archive@forrest.apache.org Received: (qmail 66300 invoked by uid 500); 10 Jun 2005 13:31:05 -0000 Mailing-List: contact svn-help@forrest.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Forrest Developers List" List-Id: Delivered-To: mailing list svn@forrest.apache.org Received: (qmail 65619 invoked by uid 99); 10 Jun 2005 13:30:58 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Fri, 10 Jun 2005 06:30:53 -0700 Received: (qmail 71875 invoked by uid 65534); 10 Jun 2005 13:03:39 -0000 Message-ID: <20050610130339.71874.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: svn commit: r189953 - /forrest/branches/locationmap_branch/main/java/org/apache/forrest/sourceexists/SourceExistsSelector.java Date: Fri, 10 Jun 2005 13:03:39 -0000 To: svn@forrest.apache.org From: rgardler@apache.org X-Mailer: svnmailer-1.0.0-dev X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: rgardler Date: Fri Jun 10 06:03:38 2005 New Revision: 189953 URL: http://svn.apache.org/viewcvs?rev=3D189953&view=3Drev Log: Check for null or empty values when validating a source exists (Thanks to T= im WIlliams) Modified: forrest/branches/locationmap_branch/main/java/org/apache/forrest/source= exists/SourceExistsSelector.java Modified: forrest/branches/locationmap_branch/main/java/org/apache/forrest/= sourceexists/SourceExistsSelector.java URL: http://svn.apache.org/viewcvs/forrest/branches/locationmap_branch/main= /java/org/apache/forrest/sourceexists/SourceExistsSelector.java?rev=3D18995= 3&r1=3D189952&r2=3D189953&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- forrest/branches/locationmap_branch/main/java/org/apache/forrest/source= exists/SourceExistsSelector.java (original) +++ forrest/branches/locationmap_branch/main/java/org/apache/forrest/source= exists/SourceExistsSelector.java Fri Jun 10 06:03:38 2005 @@ -75,6 +75,15 @@ /** Return true if Source 'uri' resolves and exists. */ public boolean select(String uri, Map objectModel, Parameters paramete= rs) { Source src =3D null; + =20 + // The locationmap module will return null if there is no match for + // the supplied hint, without the following the URI will be resolv= ed to + // the context root, which always exists, but does not contain a v= alid + // resource. + if (uri =3D=3D null || uri =3D=3D "") { + return false;=20 + } + =20 try { src =3D resolver.resolveURI(uri); if (src.exists()) {