Skip to content

Commit d1afb29

Browse files
committed
Servlet/PortletContextResource inherit isReadable, contentLength and lastModified from AbstractFileResolvingResource
1 parent b2b1ff6 commit d1afb29

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResource.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2008 the original author or authors.
2+
* Copyright 2002-2010 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,10 +22,9 @@
2222
import java.io.InputStream;
2323
import java.net.MalformedURLException;
2424
import java.net.URL;
25-
2625
import javax.portlet.PortletContext;
2726

28-
import org.springframework.core.io.AbstractResource;
27+
import org.springframework.core.io.AbstractFileResolvingResource;
2928
import org.springframework.core.io.ContextResource;
3029
import org.springframework.core.io.Resource;
3130
import org.springframework.util.Assert;
@@ -47,7 +46,7 @@
4746
* @see javax.portlet.PortletContext#getResourceAsStream
4847
* @see javax.portlet.PortletContext#getRealPath
4948
*/
50-
public class PortletContextResource extends AbstractResource implements ContextResource {
49+
public class PortletContextResource extends AbstractFileResolvingResource implements ContextResource {
5150

5251
private final PortletContext portletContext;
5352

org.springframework.web/src/main/java/org/springframework/web/context/support/ServletContextResource.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2008 the original author or authors.
2+
* Copyright 2002-2010 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,10 +22,9 @@
2222
import java.io.InputStream;
2323
import java.net.MalformedURLException;
2424
import java.net.URL;
25-
2625
import javax.servlet.ServletContext;
2726

28-
import org.springframework.core.io.AbstractResource;
27+
import org.springframework.core.io.AbstractFileResolvingResource;
2928
import org.springframework.core.io.ContextResource;
3029
import org.springframework.core.io.Resource;
3130
import org.springframework.util.Assert;
@@ -47,7 +46,7 @@
4746
* @see javax.servlet.ServletContext#getResource
4847
* @see javax.servlet.ServletContext#getRealPath
4948
*/
50-
public class ServletContextResource extends AbstractResource implements ContextResource {
49+
public class ServletContextResource extends AbstractFileResolvingResource implements ContextResource {
5150

5251
private final ServletContext servletContext;
5352

0 commit comments

Comments
 (0)