You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2016/06/08 20:25:38 UTC
wicket git commit: Do not (de)serialize DiskFileItem.
Repository: wicket
Updated Branches:
refs/heads/wicket-6.x d96eda490 -> 8faa056f3
Do not (de)serialize DiskFileItem.
X-Ref: https://github.com/apache/commons-fileupload/commit/7b201e44962c99cf4019e137aee9ccc0273c3ab1
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/8faa056f
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/8faa056f
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/8faa056f
Branch: refs/heads/wicket-6.x
Commit: 8faa056f35bb1fe0b21a92d0450a5aadad8f7753
Parents: d96eda4
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Wed Jun 8 22:25:02 2016 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Wed Jun 8 22:25:02 2016 +0200
----------------------------------------------------------------------
.../apache/wicket/util/upload/DiskFileItem.java | 31 --------------------
1 file changed, 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/8faa056f/wicket-util/src/main/java/org/apache/wicket/util/upload/DiskFileItem.java
----------------------------------------------------------------------
diff --git a/wicket-util/src/main/java/org/apache/wicket/util/upload/DiskFileItem.java b/wicket-util/src/main/java/org/apache/wicket/util/upload/DiskFileItem.java
index f4ec711..b7dfabe 100644
--- a/wicket-util/src/main/java/org/apache/wicket/util/upload/DiskFileItem.java
+++ b/wicket-util/src/main/java/org/apache/wicket/util/upload/DiskFileItem.java
@@ -710,19 +710,6 @@ public class DiskFileItem implements FileItem, FileItemHeadersSupport
*/
private void writeObject(final ObjectOutputStream out) throws IOException
{
- // Read the data
- if (dfos.isInMemory())
- {
- cachedContent = get();
- }
- else
- {
- cachedContent = null;
- dfosFile = dfos.getFile();
- }
-
- // write out values
- out.defaultWriteObject();
}
/**
@@ -738,24 +725,6 @@ public class DiskFileItem implements FileItem, FileItemHeadersSupport
*/
private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException
{
- // read values
- in.defaultReadObject();
-
- OutputStream output = getOutputStream();
- if (cachedContent != null)
- {
- output.write(cachedContent);
- }
- else
- {
- FileInputStream input = new FileInputStream(dfosFile);
- Streams.copy(input, output);
- Files.remove(dfosFile);
- dfosFile = null;
- }
- output.close();
-
- cachedContent = null;
}
/**