You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by so...@apache.org on 2018/01/02 08:07:56 UTC
wicket git commit: [WICKET-6504] path can be null
Repository: wicket
Updated Branches:
refs/heads/master 4b8ac4c8c -> 7e25f47fd
[WICKET-6504] path can be null
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/7e25f47f
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/7e25f47f
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/7e25f47f
Branch: refs/heads/master
Commit: 7e25f47fd1259c34824d40d5ec52e0b595ded774
Parents: 4b8ac4c
Author: Maxim Solodovnik <so...@gmail.com>
Authored: Tue Jan 2 15:07:48 2018 +0700
Committer: Maxim Solodovnik <so...@gmail.com>
Committed: Tue Jan 2 15:07:48 2018 +0700
----------------------------------------------------------------------
.../java/org/apache/wicket/resource/FileSystemResource.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/7e25f47f/wicket-core/src/main/java/org/apache/wicket/resource/FileSystemResource.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/resource/FileSystemResource.java b/wicket-core/src/main/java/org/apache/wicket/resource/FileSystemResource.java
index bc5c859..f8aca6f 100644
--- a/wicket-core/src/main/java/org/apache/wicket/resource/FileSystemResource.java
+++ b/wicket-core/src/main/java/org/apache/wicket/resource/FileSystemResource.java
@@ -29,7 +29,6 @@ import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.request.cycle.RequestCycle;
import org.apache.wicket.request.resource.AbstractResource;
import org.apache.wicket.request.resource.PartWriterCallback;
-import org.apache.wicket.util.lang.Args;
/**
* Used to provide resources based on the on Java NIO FileSystem API.<br>
@@ -185,19 +184,19 @@ public class FileSystemResource extends AbstractResource
private static class PathModel extends LoadableDetachableModel<Path>
{
+ private static final long serialVersionUID = 1L;
private final String pathAsString;
public PathModel(Path path)
{
super(path);
- Args.notNull(path, "path");
- this.pathAsString = path.toString();
+ this.pathAsString = path == null ? null : path.toString();
}
@Override
protected Path load()
{
- return Paths.get(pathAsString);
+ return pathAsString == null ? null : Paths.get(pathAsString);
}
}
}