Skip to content

Commit

Permalink
Resource.resolve is now abstract
Browse files Browse the repository at this point in the history
  • Loading branch information
joakime committed Sep 22, 2022
1 parent 74acb62 commit 7f86ec1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ public long length()
return _bytes.length;
}

@Override
public Resource resolve(String subUriPath)
{
return null;
}

@Override
public InputStream newInputStream() throws IOException
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,7 @@ public List<Resource> list()
* @return a Resource representing the subUriPath
* @throws IllegalArgumentException if subUriPath is invalid
*/
public Resource resolve(String subUriPath)
{
// abstract returns null always.
return null;
}
public abstract Resource resolve(String subUriPath);

/**
* @return true if this Resource is an alias to another real Resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
* SelectiveJarResource
*
* Selectively copies resources from a jar file based on includes/excludes.
* TODO: investigate if copyTo() can instead have an IncludeExcludeSet as a parameter?
* TODO: or have a smaller ResourceWrapper jetty-core class that can be overridden for specific behavior like in this class
*/
public class SelectiveJarResource extends Resource
{
Expand Down Expand Up @@ -134,6 +136,12 @@ public String getFileName()
return _delegate.getFileName();
}

@Override
public Resource resolve(String subUriPath)
{
return _delegate.resolve(subUriPath);
}

@Override
public void copyTo(Path directory) throws IOException
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
* SelectiveJarResource
*
* Selectively copies resources from a jar file based on includes/excludes.
* TODO: investigate if copyTo() can instead have an IncludeExcludeSet as a parameter?
* TODO: or have a smaller ResourceWrapper jetty-core class that can be overridden for specific behavior like in this class
*/
public class SelectiveJarResource extends Resource
{
Expand Down Expand Up @@ -134,6 +136,12 @@ public String getFileName()
return _delegate.getFileName();
}

@Override
public Resource resolve(String subUriPath)
{
return _delegate.resolve(subUriPath);
}

@Override
public void copyTo(Path directory) throws IOException
{
Expand Down

0 comments on commit 7f86ec1

Please sign in to comment.