2011/3/2 <ma...@apache.org>: > Author: markt > Date: Wed Mar 2 13:23:37 2011 > New Revision: 1076212 > > URL: http://svn.apache.org/viewvc?rev=1076212&view=rev > Log: > Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=27988 > Improve reporting of missing files >
> Modified: > tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java > tomcat/trunk/webapps/docs/changelog.xml > > > - throw new FileNotFoundException(); > + throw new FileNotFoundException( > + getURL() == null ? "null" : getURL().toString()); There is simpler code that does the same as the above line: String.valueOf(getURL()) > @@ -378,7 +379,8 @@ public class DirContextURLConnection > connect(); > > if (resource == null) { > - throw new FileNotFoundException(); > + throw new FileNotFoundException( > + getURL() == null ? "null" : getURL().toString()); > } > > // Reopen resource > @@ -418,7 +420,8 @@ public class DirContextURLConnection > } > > if ((resource == null) && (collection == null)) { > - throw new FileNotFoundException(); > + throw new FileNotFoundException( > + getURL() == null ? "null" : getURL().toString()); > } > > Vector<String> result = new Vector<String>(); > @@ -446,7 +449,8 @@ public class DirContextURLConnection > } > } catch (NamingException e) { > // Unexpected exception > - throw new FileNotFoundException(); > + throw new FileNotFoundException( > + getURL() == null ? "null" : getURL().toString()); > } > } > Best regards, --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org