You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ma...@apache.org on 2017/12/05 09:59:31 UTC
[1/4] commons-fileupload git commit: toLowerCase() should always
specify a Locale
Repository: commons-fileupload
Updated Branches:
refs/heads/master 6c00d575a -> cae90face
toLowerCase() should always specify a Locale
Project: http://git-wip-us.apache.org/repos/asf/commons-fileupload/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-fileupload/commit/3cc0a34d
Tree: http://git-wip-us.apache.org/repos/asf/commons-fileupload/tree/3cc0a34d
Diff: http://git-wip-us.apache.org/repos/asf/commons-fileupload/diff/3cc0a34d
Branch: refs/heads/master
Commit: 3cc0a34d2dd4d8ee6ad2f025a955b6d98e2b8f2d
Parents: 6c00d57
Author: Mark Thomas <ma...@apache.org>
Authored: Tue Dec 5 09:57:43 2017 +0000
Committer: Mark Thomas <ma...@apache.org>
Committed: Tue Dec 5 09:57:43 2017 +0000
----------------------------------------------------------------------
.../java/org/apache/commons/fileupload/util/mime/MimeUtility.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-fileupload/blob/3cc0a34d/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java b/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java
index e92f719..b8a7e46 100644
--- a/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java
+++ b/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java
@@ -212,7 +212,7 @@ public final class MimeUtility {
}
// pull out the character set information (this is the MIME name at this point).
- String charset = word.substring(2, charsetPos).toLowerCase();
+ String charset = word.substring(2, charsetPos).toLowerCase(Locale.ENGLISH);
// now pull out the encoding token the same way.
int encodingPos = word.indexOf('?', charsetPos + 1);
[3/4] commons-fileupload git commit: Remove extra whitespace
Posted by ma...@apache.org.
Remove extra whitespace
Project: http://git-wip-us.apache.org/repos/asf/commons-fileupload/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-fileupload/commit/bede1aac
Tree: http://git-wip-us.apache.org/repos/asf/commons-fileupload/tree/bede1aac
Diff: http://git-wip-us.apache.org/repos/asf/commons-fileupload/diff/bede1aac
Branch: refs/heads/master
Commit: bede1aaceec656c4330e7c51b3f232ae469e7e0e
Parents: a2446c7
Author: Mark Thomas <ma...@apache.org>
Authored: Tue Dec 5 09:58:44 2017 +0000
Committer: Mark Thomas <ma...@apache.org>
Committed: Tue Dec 5 09:58:44 2017 +0000
----------------------------------------------------------------------
.../java/org/apache/commons/fileupload/disk/DiskFileItem.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-fileupload/blob/bede1aac/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java b/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java
index 81aeebc..fdcf83e 100644
--- a/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java
+++ b/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java
@@ -415,7 +415,7 @@ public class DiskFileItem
public void delete() {
cachedContent = null;
File outputFile = getStoreLocation();
- if (outputFile != null && !isInMemory() && outputFile.exists()) {
+ if (outputFile != null && !isInMemory() && outputFile.exists()) {
outputFile.delete();
}
}
@@ -523,7 +523,7 @@ public class DiskFileItem
*/
@Override
protected void finalize() {
- if (dfos == null || dfos.isInMemory()) {
+ if (dfos == null || dfos.isInMemory()) {
return;
}
File outputFile = dfos.getFile();
[4/4] commons-fileupload git commit: Improve exception message
Posted by ma...@apache.org.
Improve exception message
Project: http://git-wip-us.apache.org/repos/asf/commons-fileupload/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-fileupload/commit/cae90fac
Tree: http://git-wip-us.apache.org/repos/asf/commons-fileupload/tree/cae90fac
Diff: http://git-wip-us.apache.org/repos/asf/commons-fileupload/diff/cae90fac
Branch: refs/heads/master
Commit: cae90facebc54803232a0593003914ca77193a73
Parents: bede1aa
Author: Mark Thomas <ma...@apache.org>
Authored: Tue Dec 5 09:59:05 2017 +0000
Committer: Mark Thomas <ma...@apache.org>
Committed: Tue Dec 5 09:59:05 2017 +0000
----------------------------------------------------------------------
src/main/java/org/apache/commons/fileupload/MultipartStream.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-fileupload/blob/cae90fac/src/main/java/org/apache/commons/fileupload/MultipartStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/fileupload/MultipartStream.java b/src/main/java/org/apache/commons/fileupload/MultipartStream.java
index ee60a3d..38d57ff 100644
--- a/src/main/java/org/apache/commons/fileupload/MultipartStream.java
+++ b/src/main/java/org/apache/commons/fileupload/MultipartStream.java
@@ -507,7 +507,7 @@ public class MultipartStream {
throws IllegalBoundaryException {
if (boundary.length != boundaryLength - BOUNDARY_PREFIX.length) {
throw new IllegalBoundaryException(
- "The length of a boundary token can not be changed");
+ "The length of a boundary token cannot be changed");
}
System.arraycopy(boundary, 0, this.boundary, BOUNDARY_PREFIX.length,
boundary.length);
[2/4] commons-fileupload git commit: Fix typo
Posted by ma...@apache.org.
Fix typo
Project: http://git-wip-us.apache.org/repos/asf/commons-fileupload/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-fileupload/commit/a2446c7f
Tree: http://git-wip-us.apache.org/repos/asf/commons-fileupload/tree/a2446c7f
Diff: http://git-wip-us.apache.org/repos/asf/commons-fileupload/diff/a2446c7f
Branch: refs/heads/master
Commit: a2446c7fced12f49766206009ba193b8e1563ca5
Parents: 3cc0a34
Author: Mark Thomas <ma...@apache.org>
Authored: Tue Dec 5 09:58:10 2017 +0000
Committer: Mark Thomas <ma...@apache.org>
Committed: Tue Dec 5 09:58:10 2017 +0000
----------------------------------------------------------------------
.../org/apache/commons/fileupload/disk/DiskFileItemFactory.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-fileupload/blob/a2446c7f/src/main/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java b/src/main/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java
index 6a00a0c..c9deb50 100644
--- a/src/main/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java
+++ b/src/main/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java
@@ -241,7 +241,7 @@ public class DiskFileItemFactory implements FileItemFactory {
/**
* Sets the default charset for use when no explicit charset
* parameter is provided by the sender.
- * @param pCsharset the default charset
+ * @param pCharset the default charset
*/
public void setDefaultCharset(String pCharset) {
defaultCharset = pCharset;
Re: [1/4] commons-fileupload git commit: toLowerCase() should always
specify a Locale
Posted by Gary Gregory <ga...@gmail.com>.
I think you might want Locale.ROOT.
Gary
On Tue, Dec 5, 2017 at 2:59 AM, <ma...@apache.org> wrote:
> Repository: commons-fileupload
> Updated Branches:
> refs/heads/master 6c00d575a -> cae90face
>
>
> toLowerCase() should always specify a Locale
>
>
> Project: http://git-wip-us.apache.org/repos/asf/commons-fileupload/repo
> Commit: http://git-wip-us.apache.org/repos/asf/commons-fileupload/
> commit/3cc0a34d
> Tree: http://git-wip-us.apache.org/repos/asf/commons-fileupload/
> tree/3cc0a34d
> Diff: http://git-wip-us.apache.org/repos/asf/commons-fileupload/
> diff/3cc0a34d
>
> Branch: refs/heads/master
> Commit: 3cc0a34d2dd4d8ee6ad2f025a955b6d98e2b8f2d
> Parents: 6c00d57
> Author: Mark Thomas <ma...@apache.org>
> Authored: Tue Dec 5 09:57:43 2017 +0000
> Committer: Mark Thomas <ma...@apache.org>
> Committed: Tue Dec 5 09:57:43 2017 +0000
>
> ----------------------------------------------------------------------
> .../java/org/apache/commons/fileupload/util/mime/MimeUtility.java | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/commons-fileupload/
> blob/3cc0a34d/src/main/java/org/apache/commons/fileupload/
> util/mime/MimeUtility.java
> ----------------------------------------------------------------------
> diff --git a/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java
> b/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java
> index e92f719..b8a7e46 100644
> --- a/src/main/java/org/apache/commons/fileupload/util/mime/
> MimeUtility.java
> +++ b/src/main/java/org/apache/commons/fileupload/util/mime/
> MimeUtility.java
> @@ -212,7 +212,7 @@ public final class MimeUtility {
> }
>
> // pull out the character set information (this is the MIME name
> at this point).
> - String charset = word.substring(2, charsetPos).toLowerCase();
> + String charset = word.substring(2, charsetPos).toLowerCase(
> Locale.ENGLISH);
>
> // now pull out the encoding token the same way.
> int encodingPos = word.indexOf('?', charsetPos + 1);
>
>