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 2014/09/04 08:22:46 UTC
[1/2] git commit: WICKET-5691 Wicket FileUploadField.getFileUploads()
should never return null.
Repository: wicket
Updated Branches:
refs/heads/master 8f2a6d2c0 -> a3aa418c5
WICKET-5691 Wicket FileUploadField.getFileUploads() should never return null.
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/a11c0522
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/a11c0522
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/a11c0522
Branch: refs/heads/master
Commit: a11c05229400f9d9401e2fec5aeaa7468da2c5f5
Parents: 8f2a6d2
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Thu Sep 4 09:18:44 2014 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Thu Sep 4 09:18:44 2014 +0300
----------------------------------------------------------------------
.../wicket/markup/html/form/upload/FileUploadField.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/a11c0522/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/FileUploadField.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/FileUploadField.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/FileUploadField.java
index d5b85fd..a3ba037 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/FileUploadField.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/FileUploadField.java
@@ -77,7 +77,7 @@ public class FileUploadField extends FormComponent<List<FileUpload>>
{
List<FileUpload> fileUploads = getFileUploads();
- return (fileUploads != null && !fileUploads.isEmpty()) ? fileUploads.get(0) : null;
+ return fileUploads.isEmpty() ? null : fileUploads.get(0) ;
}
/**
@@ -95,7 +95,7 @@ public class FileUploadField extends FormComponent<List<FileUpload>>
return fileUploads;
}
- fileUploads = new ArrayList<FileUpload>();
+ fileUploads = new ArrayList<>();
// Get request
final Request request = getRequest();
@@ -142,9 +142,9 @@ public class FileUploadField extends FormComponent<List<FileUpload>>
public String[] getInputAsArray()
{
List<FileUpload> fileUploads = getFileUploads();
- if (fileUploads != null)
+ if (fileUploads.isEmpty() == false)
{
- List<String> clientFileNames = new ArrayList<String>();
+ List<String> clientFileNames = new ArrayList<>();
for (FileUpload fu : fileUploads)
{
clientFileNames.add(fu.getClientFileName());
[2/2] git commit: Remove meaningless javadoc. No functional changes
Posted by mg...@apache.org.
Remove meaningless javadoc. No functional changes
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/a3aa418c
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/a3aa418c
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/a3aa418c
Branch: refs/heads/master
Commit: a3aa418c5ef1a4f0d8b034bb3b4ff3442f7c996b
Parents: a11c052
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Thu Sep 4 09:22:20 2014 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Thu Sep 4 09:22:20 2014 +0300
----------------------------------------------------------------------
.../markup/html/form/upload/FileUploadField.java | 16 ----------------
1 file changed, 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/a3aa418c/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/FileUploadField.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/FileUploadField.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/FileUploadField.java
index a3ba037..8a22745 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/FileUploadField.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/FileUploadField.java
@@ -123,9 +123,6 @@ public class FileUploadField extends FormComponent<List<FileUpload>>
return fileUploads;
}
- /**
- * @see org.apache.wicket.markup.html.form.FormComponent#updateModel()
- */
@Override
public void updateModel()
{
@@ -135,9 +132,6 @@ public class FileUploadField extends FormComponent<List<FileUpload>>
}
}
- /**
- * @see org.apache.wicket.markup.html.form.FormComponent#getInputAsArray()
- */
@Override
public String[] getInputAsArray()
{
@@ -154,10 +148,6 @@ public class FileUploadField extends FormComponent<List<FileUpload>>
return null;
}
- /**
- *
- * @see org.apache.wicket.markup.html.form.FormComponent#convertValue(java.lang.String[])
- */
@Override
protected List<FileUpload> convertValue(String[] value) throws ConversionException
{
@@ -169,18 +159,12 @@ public class FileUploadField extends FormComponent<List<FileUpload>>
return getFileUploads();
}
- /**
- * @see org.apache.wicket.markup.html.form.FormComponent#isMultiPart()
- */
@Override
public boolean isMultiPart()
{
return true;
}
- /**
- * @see org.apache.wicket.Component#onComponentTag(org.apache.wicket.markup.ComponentTag)
- */
@Override
protected void onComponentTag(ComponentTag tag)
{