You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/07/17 18:06:05 UTC
[commons-fileupload] branch master updated (c56fdca -> baba6a7)
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-fileupload.git
from c56fdca Bump actions/cache 3.0.4 to 3.0.5
new 130cb8e Use compact array declaration
new f802ea6 Use compact array declaration
new baba6a7 Use valueOf()
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/test/java/org/apache/commons/fileupload2/FileUploadTest.java | 6 ++----
.../java/org/apache/commons/fileupload2/ProgressListenerTest.java | 6 +++---
.../apache/commons/fileupload2/util/mime/Base64DecoderTestCase.java | 2 +-
3 files changed, 6 insertions(+), 8 deletions(-)
[commons-fileupload] 03/03: Use valueOf()
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-fileupload.git
commit baba6a736f9be4c6d998e43da342dfbb86559949
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jul 17 14:05:50 2022 -0400
Use valueOf()
---
.../java/org/apache/commons/fileupload2/ProgressListenerTest.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/test/java/org/apache/commons/fileupload2/ProgressListenerTest.java b/src/test/java/org/apache/commons/fileupload2/ProgressListenerTest.java
index 3d3da73..59e5683 100644
--- a/src/test/java/org/apache/commons/fileupload2/ProgressListenerTest.java
+++ b/src/test/java/org/apache/commons/fileupload2/ProgressListenerTest.java
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
*/
public class ProgressListenerTest {
- private class ProgressListenerImpl implements ProgressListener {
+ private static class ProgressListenerImpl implements ProgressListener {
private final long expectedContentLength;
@@ -55,9 +55,9 @@ public class ProgressListenerTest {
assertTrue(pItems >= 0 && pItems <= expectedItems);
assertTrue(bytesRead == null || pBytesRead >= bytesRead.longValue());
- bytesRead = new Long(pBytesRead);
+ bytesRead = Long.valueOf(pBytesRead);
assertTrue(items == null || pItems >= items.intValue());
- items = new Integer(pItems);
+ items = Integer.valueOf(pItems);
}
void checkFinished() {
[commons-fileupload] 01/03: Use compact array declaration
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-fileupload.git
commit 130cb8e59050460d5875d13f192fd8ae0870ada6
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jul 17 14:05:13 2022 -0400
Use compact array declaration
---
.../org/apache/commons/fileupload2/util/mime/Base64DecoderTestCase.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/java/org/apache/commons/fileupload2/util/mime/Base64DecoderTestCase.java b/src/test/java/org/apache/commons/fileupload2/util/mime/Base64DecoderTestCase.java
index 1634d63..5becdf0 100644
--- a/src/test/java/org/apache/commons/fileupload2/util/mime/Base64DecoderTestCase.java
+++ b/src/test/java/org/apache/commons/fileupload2/util/mime/Base64DecoderTestCase.java
@@ -78,7 +78,7 @@ public final class Base64DecoderTestCase {
@Test
public void truncatedString() {
- final byte[] x = new byte[]{'n'};
+ final byte[] x = {'n'};
assertThrows(IOException.class, () -> Base64Decoder.decode(x, new ByteArrayOutputStream()));
}
[commons-fileupload] 02/03: Use compact array declaration
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-fileupload.git
commit f802ea67198028b4cda94c7328d730b69dfc509d
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jul 17 14:05:26 2022 -0400
Use compact array declaration
---
src/test/java/org/apache/commons/fileupload2/FileUploadTest.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/test/java/org/apache/commons/fileupload2/FileUploadTest.java b/src/test/java/org/apache/commons/fileupload2/FileUploadTest.java
index bc26f25..42dd106 100644
--- a/src/test/java/org/apache/commons/fileupload2/FileUploadTest.java
+++ b/src/test/java/org/apache/commons/fileupload2/FileUploadTest.java
@@ -300,12 +300,10 @@ public class FileUploadTest {
@MethodSource("data")
public void testFileUpload130(final FileUpload upload)
throws Exception {
- final String[] headerNames = new String[]
- {
+ final String[] headerNames = {
"SomeHeader", "OtherHeader", "YetAnotherHeader", "WhatAHeader"
};
- final String[] headerValues = new String[]
- {
+ final String[] headerValues = {
"present", "Is there", "Here", "Is That"
};
final List<FileItem> fileItems = Util.parseUpload(upload,