tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1076212 - in /tomcat/trunk: java/org/apache/naming/resources/DirContextURLConnection.java webapps/docs/changelog.xml
Date Wed, 02 Mar 2011 15:49:03 GMT
2011/3/2  <markt@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message