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 17:17:39 UTC
[2/2] wicket git commit: [WICKET-6504] path can be null
[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/ae7f324d
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/ae7f324d
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/ae7f324d
Branch: refs/heads/wicket-7.x
Commit: ae7f324dd3a5145d174245093c766d2bb5098bdc
Parents: 74d0f9f
Author: Maxim Solodovnik <so...@gmail.com>
Authored: Tue Jan 2 15:07:48 2018 +0700
Committer: Maxim Solodovnik <so...@gmail.com>
Committed: Wed Jan 3 00:07:04 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/ae7f324d/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 b142ae8..ab47263 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>
@@ -179,19 +178,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);
}
}
}