You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by pa...@apache.org on 2016/05/19 17:53:16 UTC
[1/2] [lang] LANG-1232: DiffBuilder: Add null check on fieldName when
appending Object or Object[] (closes #122).
Repository: commons-lang
Updated Branches:
refs/heads/master f02261849 -> 0343777db
LANG-1232: DiffBuilder: Add null check on fieldName when appending Object or Object[] (closes #122).
Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/b212aa3c
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/b212aa3c
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/b212aa3c
Branch: refs/heads/master
Commit: b212aa3c6fb91c34a0faccdf783a0a085d40be94
Parents: f022618
Author: Nick Manley <ni...@outlook.com>
Authored: Sat Jan 23 23:35:23 2016 -0600
Committer: pascalschumacher <pa...@gmx.net>
Committed: Thu May 19 19:51:51 2016 +0200
----------------------------------------------------------------------
.../org/apache/commons/lang3/builder/DiffBuilder.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-lang/blob/b212aa3c/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java b/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java
index 7a97e9c..677a3ad 100644
--- a/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java
+++ b/src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java
@@ -832,10 +832,14 @@ public class DiffBuilder implements Builder<DiffResult> {
* @param rhs
* the right hand {@code Object}
* @return this
+ * @throws IllegalArgumentException
+ * if field name is {@code null}
*/
public DiffBuilder append(final String fieldName, final Object lhs,
final Object rhs) {
-
+ if (fieldName == null) {
+ throw new IllegalArgumentException("Field name cannot be null");
+ }
if (objectsTriviallyEqual) {
return this;
}
@@ -913,10 +917,15 @@ public class DiffBuilder implements Builder<DiffResult> {
* the left hand {@code Object[]}
* @param rhs
* the right hand {@code Object[]}
+ * @throws IllegalArgumentException
+ * if field name is {@code null}
* @return this
*/
public DiffBuilder append(final String fieldName, final Object[] lhs,
final Object[] rhs) {
+ if (fieldName == null) {
+ throw new IllegalArgumentException("Field name cannot be null");
+ }
if (objectsTriviallyEqual) {
return this;
}
[2/2] [lang] LANG-1232: add changes.xml entry
Posted by pa...@apache.org.
LANG-1232: add changes.xml entry
Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/0343777d
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/0343777d
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/0343777d
Branch: refs/heads/master
Commit: 0343777db959950e490a06e72f235dd6f5f3a8c2
Parents: b212aa3
Author: pascalschumacher <pa...@gmx.net>
Authored: Thu May 19 19:52:42 2016 +0200
Committer: pascalschumacher <pa...@gmx.net>
Committed: Thu May 19 19:52:42 2016 +0200
----------------------------------------------------------------------
src/changes/changes.xml | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-lang/blob/0343777d/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index fc8162a..40eaee4 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -22,6 +22,7 @@
<body>
<release version="3.5" date="tba" description="tba">
+ <action issue="LANG-1232" type="fix" dev="pschumacher" due-to="Nick Manley">DiffBuilder: Add null check on fieldName when appending Object or Object[]</action>
<action issue="LANG-1178" type="fix" dev="pschumacher" due-to="Henri Yandell">ArrayUtils.removeAll(Object array, int... indices) should do the clone, not its callers</action>
<action issue="LANG-1151" type="update" dev="pschumacher" due-to="Juan Pablo Santos Rodr�guez">Performance improvements for NumberUtils.isParsable</action>
<action issue="LANG-1227" type="fix" dev="pschumacher" due-to="kaching88">StringUtils.stripAccents should remove accents from "\u0141" and "\u0142".</action>