You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/03/02 17:35:36 UTC
svn commit: r1573331 - in /tomcat/trunk:
java/org/apache/catalina/webresources/StandardRoot.java
webapps/docs/changelog.xml
Author: markt
Date: Sun Mar 2 16:35:35 2014
New Revision: 1573331
URL: http://svn.apache.org/r1573331
Log:
Revert r1573321 as it triggers unit test failures
Modified:
tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java?rev=1573331&r1=1573330&r2=1573331&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java (original)
+++ tomcat/trunk/java/org/apache/catalina/webresources/StandardRoot.java Sun Mar 2 16:35:35 2014
@@ -117,9 +117,6 @@ public class StandardRoot extends Lifecy
if (validate) {
path = validate(path);
}
- if (path == null) {
- return new String[] {};
- }
// Set because we don't want duplicates
// LinkedHashSet to retain the order. It is the order of the
@@ -143,9 +140,6 @@ public class StandardRoot extends Lifecy
@Override
public Set<String> listWebAppPaths(String path) {
path = validate(path);
- if (path == null) {
- return null;
- }
// Set because we don't want duplicates
HashSet<String> result = new HashSet<>();
@@ -165,9 +159,6 @@ public class StandardRoot extends Lifecy
@Override
public boolean mkdir(String path) {
path = validate(path);
- if (path == null) {
- return false;
- }
if (preResourceExists(path)) {
return false;
@@ -179,9 +170,6 @@ public class StandardRoot extends Lifecy
@Override
public boolean write(String path, InputStream is, boolean overwrite) {
path = validate(path);
- if (path == null) {
- return false;
- }
if (!overwrite && preResourceExists(path)) {
return false;
@@ -210,9 +198,6 @@ public class StandardRoot extends Lifecy
if (validate) {
path = validate(path);
}
- if (path == null) {
- return null;
- }
if (isCachingAllowed()) {
return cache.getResource(path, useClassLoaderResources);
@@ -295,9 +280,6 @@ public class StandardRoot extends Lifecy
private WebResource[] getResources(String path,
boolean useClassLoaderResources) {
path = validate(path);
- if (path == null) {
- return new WebResource[] {};
- }
ArrayList<WebResource> result = new ArrayList<>();
for (ArrayList<WebResourceSet> list : allResources) {
@@ -327,9 +309,6 @@ public class StandardRoot extends Lifecy
if (validate) {
path = validate(path);
}
- if (path == null) {
- return new WebResource[] {};
- }
String[] resources = list(path, false);
WebResource[] result = new WebResource[resources.length];
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1573331&r1=1573330&r2=1573331&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Sun Mar 2 16:35:35 2014
@@ -74,10 +74,6 @@
elements and attributes supported by the Servlet version of the merged
file. (markt)
</fix>
- <fix>
- Avoid internal <code>NullPointerException</code>s if a resource is
- requested from outside the web application root. (markt)
- </fix>
</changelog>
</subsection>
<subsection name="Coyote">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org