[lang] Make JavaDoc lint happy

2016-09-19 Thread britter
Repository: commons-lang
Updated Branches:
  refs/heads/master 09686fad4 -> 0807eedad


Make JavaDoc lint happy


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/0807eeda
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/0807eeda
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/0807eeda

Branch: refs/heads/master
Commit: 0807eedad6aa9544d90b2e7cec103fb9c40b714d
Parents: 09686fa
Author: Benedikt Ritter 
Authored: Mon Sep 19 13:21:06 2016 +0200
Committer: Benedikt Ritter 
Committed: Mon Sep 19 13:21:06 2016 +0200

--
 .../org/apache/commons/lang3/ArrayUtils.java| 313 +--
 .../commons/lang3/reflect/MethodUtils.java  |   1 +
 .../commons/lang3/time/FastDatePrinter.java |   7 +
 3 files changed, 156 insertions(+), 165 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/0807eeda/src/main/java/org/apache/commons/lang3/ArrayUtils.java
--
diff --git a/src/main/java/org/apache/commons/lang3/ArrayUtils.java 
b/src/main/java/org/apache/commons/lang3/ArrayUtils.java
index 8aff5e5..59dcf9d 100644
--- a/src/main/java/org/apache/commons/lang3/ArrayUtils.java
+++ b/src/main/java/org/apache/commons/lang3/ArrayUtils.java
@@ -1838,15 +1838,14 @@ public class ArrayUtils {
  * does nothing for a {@code null} or empty input array or for overflow 
indices.
  * Negative indices are promoted to 0(zero).
  * 
- * Examples:
- * 
- * ArrayUtils.swap(["1", "2", "3"], 0, 2) - ["3", "2", 
"1"]
- * ArrayUtils.swap(["1", "2", "3"], 0, 0) - ["1", "2", 
"3"]
- * ArrayUtils.swap(["1", "2", "3"], 1, 0) - ["2", "1", 
"3"]
- * ArrayUtils.swap(["1", "2", "3"], 0, 5) - ["1", "2", 
"3"]
- * ArrayUtils.swap(["1", "2", "3"], -1, 1) - ["2", "1", 
"3"]
- * 
- * 
+ * Examples:
+ * 
+ * ArrayUtils.swap(["1", "2", "3"], 0, 2) - ["3", "2", 
"1"]
+ * ArrayUtils.swap(["1", "2", "3"], 0, 0) - ["1", "2", 
"3"]
+ * ArrayUtils.swap(["1", "2", "3"], 1, 0) - ["2", "1", 
"3"]
+ * ArrayUtils.swap(["1", "2", "3"], 0, 5) - ["1", "2", 
"3"]
+ * ArrayUtils.swap(["1", "2", "3"], -1, 1) - ["2", "1", 
"3"]
+ * 
  *
  * @param array the array to swap, may be {@code null}
  * @param offset1 the index of the first element to swap
@@ -1861,21 +1860,21 @@ public class ArrayUtils {
 }
 
 /**
- * Swaps two elements in the given long array.
+ * Swaps two elements in the given long array.
  *
  * There is no special handling for multi-dimensional arrays. This 
method
  * does nothing for a {@code null} or empty input array or for overflow 
indices.
  * Negative indices are promoted to 0(zero).
  *
- * Examples:
- * 
- * ArrayUtils.swap([true, false, true], 0, 2) - [true, 
false, true]
- * ArrayUtils.swap([true, false, true], 0, 0) - [true, 
false, true]
- * ArrayUtils.swap([true, false, true], 1, 0) - [false, 
true, true]
- * ArrayUtils.swap([true, false, true], 0, 5) - [true, 
false, true]
- * ArrayUtils.swap([true, false, true], -1, 1) - [false, 
true, true]
- * 
- * 
+ * Examples:
+ * 
+ * ArrayUtils.swap([true, false, true], 0, 2) - [true, false, 
true]
+ * ArrayUtils.swap([true, false, true], 0, 0) - [true, false, 
true]
+ * ArrayUtils.swap([true, false, true], 1, 0) - [false, true, 
true]
+ * ArrayUtils.swap([true, false, true], 0, 5) - [true, false, 
true]
+ * ArrayUtils.swap([true, false, true], -1, 1) - [false, true, 
true]
+ * 
+ *
  *
  * @param array  the array to swap, may be {@code null}
  * @param offset1 the index of the first element to swap
@@ -1896,15 +1895,14 @@ public class ArrayUtils {
  * does nothing for a {@code null} or empty input array or for overflow 
indices.
  * Negative indices are promoted to 0(zero).
  *
- * Examples:
- * 
- * ArrayUtils.swap([1, 2, 3], 0, 2) - [3, 2, 1]
- * ArrayUtils.swap([1, 2, 3], 0, 0) - [1, 2, 3]
- * ArrayUtils.swap([1, 2, 3], 1, 0) - [2, 1, 3]
- * ArrayUtils.swap([1, 2, 3], 0, 5) - [1, 2, 3]
- * ArrayUtils.swap([1, 2, 3], -1, 1) - [2, 1, 3]
- * 
- * 
+ * Examples:
+ * 
+ * ArrayUtils.swap([1, 2, 3], 0, 2) - [3, 2, 1]
+ * ArrayUtils.swap([1, 2, 3], 0, 0) - [1, 2, 3]
+ * ArrayUtils.swap([1, 2, 3], 1, 0) - [2, 1, 3]
+ * ArrayUtils.swap([1, 2, 3], 0, 5) - [1, 2, 3]
+ * ArrayUtils.swap([1, 2, 3], -1, 1) - [2, 1, 3]
+ * 
  *
  * @param 

[lang] Add dependency tags to make it easier to copy past the dependency definition

2016-09-19 Thread britter
Repository: commons-lang
Updated Branches:
  refs/heads/master 0807eedad -> e6ad17215


Add dependency tags to make it easier to copy past the dependency definition


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/e6ad1721
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/e6ad1721
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/e6ad1721

Branch: refs/heads/master
Commit: e6ad17215d27b66b7fe43931247fc3470d8dee18
Parents: 0807eed
Author: Benedikt Ritter 
Authored: Mon Sep 19 13:31:19 2016 +0200
Committer: Benedikt Ritter 
Committed: Mon Sep 19 13:31:19 2016 +0200

--
 src/site/xdoc/index.xml | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/e6ad1721/src/site/xdoc/index.xml
--
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index 1d304f4..197a33d 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -74,9 +74,11 @@ The code base is monitored by a Sonar instance running on https://analy
 
 Alternatively you can pull it from the central Maven repositories:
 
+dependency
   groupIdorg.apache.commons/groupId
   artifactIdcommons-lang3/artifactId
   version3.4/version
+/dependency
 
 
 



[2/2] [lang] PMD: Remove useless parentheses

2016-09-19 Thread britter
PMD: Remove useless parentheses


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/9c5b6cdc
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/9c5b6cdc
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/9c5b6cdc

Branch: refs/heads/master
Commit: 9c5b6cdc7108eb071785b0c4edd205650cdf1ca4
Parents: 3421e6a
Author: Benedikt Ritter 
Authored: Mon Sep 19 13:56:11 2016 +0200
Committer: Benedikt Ritter 
Committed: Mon Sep 19 13:56:11 2016 +0200

--
 .../org/apache/commons/lang3/CharSetUtils.java  |  4 +--
 .../org/apache/commons/lang3/LocaleUtils.java   |  2 +-
 .../commons/lang3/builder/CompareToBuilder.java | 32 ++--
 .../commons/lang3/builder/EqualsBuilder.java|  4 +--
 .../commons/lang3/builder/HashCodeBuilder.java  |  4 +--
 .../apache/commons/lang3/math/NumberUtils.java  | 21 ++---
 .../commons/lang3/reflect/MemberUtils.java  |  2 +-
 7 files changed, 33 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/9c5b6cdc/src/main/java/org/apache/commons/lang3/CharSetUtils.java
--
diff --git a/src/main/java/org/apache/commons/lang3/CharSetUtils.java 
b/src/main/java/org/apache/commons/lang3/CharSetUtils.java
index 67d6fea..6284e38 100644
--- a/src/main/java/org/apache/commons/lang3/CharSetUtils.java
+++ b/src/main/java/org/apache/commons/lang3/CharSetUtils.java
@@ -76,10 +76,10 @@ public class CharSetUtils {
 for (int i = 1; i < sz; i++) {
 ch = chrs[i];
 if (ch == lastChar) {
-if ((inChars != null) && (ch == inChars)) {
+if (inChars != null && ch == inChars) {
 continue;
 } else {
-if ((notInChars == null) || (ch != notInChars)) {
+if (notInChars == null || ch != notInChars) {
 if (chars.contains(ch)) {
 inChars = ch;
 continue;

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/9c5b6cdc/src/main/java/org/apache/commons/lang3/LocaleUtils.java
--
diff --git a/src/main/java/org/apache/commons/lang3/LocaleUtils.java 
b/src/main/java/org/apache/commons/lang3/LocaleUtils.java
index 18e98bb..4185373 100644
--- a/src/main/java/org/apache/commons/lang3/LocaleUtils.java
+++ b/src/main/java/org/apache/commons/lang3/LocaleUtils.java
@@ -142,7 +142,7 @@ public class LocaleUtils {
 case 2:
 if (StringUtils.isAllLowerCase(split[0]) && 
 (split[0].length() == 2 || split[0].length() == 3) &&
-(split[1].length() == 0 || (split[1].length() == 2 && 
StringUtils.isAllUpperCase(split[1]))) &&
+(split[1].length() == 0 || split[1].length() == 2 && 
StringUtils.isAllUpperCase(split[1])) &&
  split[2].length() > 0) {
 return new Locale(split[0], split[1], split[2]);
 }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/9c5b6cdc/src/main/java/org/apache/commons/lang3/builder/CompareToBuilder.java
--
diff --git 
a/src/main/java/org/apache/commons/lang3/builder/CompareToBuilder.java 
b/src/main/java/org/apache/commons/lang3/builder/CompareToBuilder.java
index e79a1c9..875b088 100644
--- a/src/main/java/org/apache/commons/lang3/builder/CompareToBuilder.java
+++ b/src/main/java/org/apache/commons/lang3/builder/CompareToBuilder.java
@@ -322,9 +322,9 @@ public class CompareToBuilder implements Builder {
 for (int i = 0; i < fields.length && builder.comparison == 0; i++) {
 final Field f = fields[i];
 if (!ArrayUtils.contains(excludeFields, f.getName())
-&& (!f.getName().contains("$"))
+&& !f.getName().contains("$")
 && (useTransients || !Modifier.isTransient(f.getModifiers()))
-&& (!Modifier.isStatic(f.getModifiers( {
+&& !Modifier.isStatic(f.getModifiers())) {
 try {
 builder.append(f.get(lhs), f.get(rhs));
 } catch (final IllegalAccessException e) {
@@ -475,7 +475,7 @@ public class CompareToBuilder implements Builder {
 if (comparison != 0) {
 return this;
 }
-comparison = ((lhs < rhs) ? -1 : ((lhs > rhs) ? 1 : 0));
+comparison = lhs < rhs ? -1 : lhs > rhs ? 1 : 0;
 return this;
 }
 
@@ -491,7 +491,7 @@ public class CompareToBuilder implements Builder {
 if (comparison != 0) {
 

[1/2] [lang] Remove unused private fields

2016-09-19 Thread britter
Repository: commons-lang
Updated Branches:
  refs/heads/master d962a2b31 -> 9c5b6cdc7


Remove unused private fields


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/3421e6ad
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/3421e6ad
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/3421e6ad

Branch: refs/heads/master
Commit: 3421e6adb4a3a4fadae79feb0f180e78e2698374
Parents: d962a2b
Author: Benedikt Ritter 
Authored: Mon Sep 19 13:46:41 2016 +0200
Committer: Benedikt Ritter 
Committed: Mon Sep 19 13:46:41 2016 +0200

--
 src/main/java/org/apache/commons/lang3/Validate.java | 10 --
 1 file changed, 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/3421e6ad/src/main/java/org/apache/commons/lang3/Validate.java
--
diff --git a/src/main/java/org/apache/commons/lang3/Validate.java 
b/src/main/java/org/apache/commons/lang3/Validate.java
index da20da4..508845a 100644
--- a/src/main/java/org/apache/commons/lang3/Validate.java
+++ b/src/main/java/org/apache/commons/lang3/Validate.java
@@ -49,16 +49,6 @@ public class Validate {
 "The validated value is not a number";
 private static final String DEFAULT_FINITE_EX_MESSAGE =
 "The value is invalid: %f";
-private static final String DEFAULT_GREATER_EX_MESSAGE =
-"The value %s is not greater than %s";
-private static final String DEFAULT_GREATER_OR_EQUAL_EX_MESSAGE =
-"The value %s is not greater than or equal to %s";
-private static final String DEFAULT_SMALLER_EX_MESSAGE =
-"The value %s is not smaller than %s";
-private static final String DEFAULT_SMALLER_OR_EQUAL_EX_MESSAGE =
-"The value %s is not smaller than or equal to %s";
-private static final String DEFAULT_DIFFERENT_EX_MESSAGE =
-"The value %s is invalid";
 private static final String DEFAULT_EXCLUSIVE_BETWEEN_EX_MESSAGE =
 "The value %s is not in the specified exclusive range of %s to %s";
 private static final String DEFAULT_INCLUSIVE_BETWEEN_EX_MESSAGE =



[lang] Remove trailing white spaces

2016-09-19 Thread britter
Repository: commons-lang
Updated Branches:
  refs/heads/master feb7ba551 -> ff2672a57


Remove trailing white spaces


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/ff2672a5
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/ff2672a5
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/ff2672a5

Branch: refs/heads/master
Commit: ff2672a57816d75a740813f8d26d830bd2f9b7cf
Parents: feb7ba5
Author: Benedikt Ritter 
Authored: Mon Sep 19 09:03:10 2016 +0200
Committer: Benedikt Ritter 
Committed: Mon Sep 19 09:03:10 2016 +0200

--
 .../java/org/apache/commons/lang3/time/FastDateFormatTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ff2672a5/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
--
diff --git 
a/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java 
b/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
index 564c10c..41fd60a 100644
--- a/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
@@ -53,7 +53,7 @@ public class FastDateFormatTest {
 public SystemDefaultsSwitch defaults = new SystemDefaultsSwitch();
 
 /*
- * Only the cache methods need to be tested here.  
+ * Only the cache methods need to be tested here.
  * The print methods are tested by {@link FastDateFormat_PrinterTest}
  * and the parse methods are tested by {@link FastDateFormat_ParserTest}
  */



[2/2] [lang] Checkstyle: Convert tabs to spaces

2016-09-19 Thread britter
Checkstyle: Convert tabs to spaces


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/d962a2b3
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/d962a2b3
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/d962a2b3

Branch: refs/heads/master
Commit: d962a2b31c9a7216c2df557eaed3e475b13939f1
Parents: d58d64d
Author: Benedikt Ritter 
Authored: Mon Sep 19 13:40:46 2016 +0200
Committer: Benedikt Ritter 
Committed: Mon Sep 19 13:40:46 2016 +0200

--
 .../commons/lang3/reflect/MethodUtils.java  | 36 ++--
 1 file changed, 18 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/d962a2b3/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
--
diff --git a/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java 
b/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
index 3acbd73..388eba7 100644
--- a/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
+++ b/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
@@ -764,24 +764,24 @@ public class MethodUtils {
  * @return the aggregate number of inheritance hops between assignable 
argument class types.
  */
 private static int distance(Class[] classArray, Class[] 
toClassArray) {
-   int answer=0;
-   
-   if (!ClassUtils.isAssignable(classArray, toClassArray, true)) {
-   return -1;
-   }
-   for (int offset = 0; offset < classArray.length; offset++) {
-   // Note InheritanceUtils.distance() uses different scoring 
system.
-   if (classArray[offset].equals(toClassArray[offset])) {
-   continue;
-   } else if (ClassUtils.isAssignable(classArray[offset], 
toClassArray[offset], true) 
-   && !ClassUtils.isAssignable(classArray[offset], 
toClassArray[offset], false)) {
-   answer++;
-   } else {
-   answer = answer+2;
-   }
-   }
-   
-   return answer;
+int answer = 0;
+
+if (!ClassUtils.isAssignable(classArray, toClassArray, true)) {
+return -1;
+}
+for (int offset = 0; offset < classArray.length; offset++) {
+// Note InheritanceUtils.distance() uses different scoring system.
+if (classArray[offset].equals(toClassArray[offset])) {
+continue;
+} else if (ClassUtils.isAssignable(classArray[offset], 
toClassArray[offset], true)
+&& !ClassUtils.isAssignable(classArray[offset], 
toClassArray[offset], false)) {
+answer++;
+} else {
+answer = answer + 2;
+}
+}
+
+return answer;
 }
 
 /**



[1/2] [lang] Checkstyle: Add missing curly braces

2016-09-19 Thread britter
Repository: commons-lang
Updated Branches:
  refs/heads/master e6ad17215 -> d962a2b31


Checkstyle: Add missing curly braces


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/d58d64dd
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/d58d64dd
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/d58d64dd

Branch: refs/heads/master
Commit: d58d64ddb1f205a54c7eb57fe0cbec9c59cad8d6
Parents: e6ad172
Author: Benedikt Ritter 
Authored: Mon Sep 19 13:39:49 2016 +0200
Committer: Benedikt Ritter 
Committed: Mon Sep 19 13:39:49 2016 +0200

--
 src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/d58d64dd/src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java
--
diff --git a/src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java 
b/src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java
index 3922bb4..41605cf 100644
--- a/src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java
+++ b/src/main/java/org/apache/commons/lang3/reflect/MemberUtils.java
@@ -153,8 +153,9 @@ abstract class MemberUtils {
 // "source" and "destination" are the actual and declared args 
respectively.
 float totalCost = 0.0f;
 final long normalArgsLen = isVarArgs ? destArgs.length-1 : 
destArgs.length;
-if (srcArgs.length < normalArgsLen)
+if (srcArgs.length < normalArgsLen) {
 return Float.MAX_VALUE;
+}
 for (int i = 0; i < normalArgsLen; i++) {
 totalCost += getObjectTransformationCost(srcArgs[i], destArgs[i]);
 }



commons-io git commit: Remove redundant type arguments.

2016-09-19 Thread ggregory
Repository: commons-io
Updated Branches:
  refs/heads/master 9ba9b49af -> 822bd135f


Remove redundant type arguments.

Project: http://git-wip-us.apache.org/repos/asf/commons-io/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-io/commit/822bd135
Tree: http://git-wip-us.apache.org/repos/asf/commons-io/tree/822bd135
Diff: http://git-wip-us.apache.org/repos/asf/commons-io/diff/822bd135

Branch: refs/heads/master
Commit: 822bd135f3a54b8fbeb23c313535b13c18198c3a
Parents: 9ba9b49
Author: Gary Gregory 
Authored: Mon Sep 19 22:40:29 2016 -0700
Committer: Gary Gregory 
Committed: Mon Sep 19 22:40:29 2016 -0700

--
 .../commons/io/input/ObservableInputStream.java | 476 +--
 1 file changed, 238 insertions(+), 238 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-io/blob/822bd135/src/main/java/org/apache/commons/io/input/ObservableInputStream.java
--
diff --git 
a/src/main/java/org/apache/commons/io/input/ObservableInputStream.java 
b/src/main/java/org/apache/commons/io/input/ObservableInputStream.java
index 7d13472..c580ba4 100644
--- a/src/main/java/org/apache/commons/io/input/ObservableInputStream.java
+++ b/src/main/java/org/apache/commons/io/input/ObservableInputStream.java
@@ -1,238 +1,238 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.io.input;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.security.MessageDigest;
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- * The {@link ObservableInputStream} allows, that an InputStream may be 
consumed
- * by other receivers, apart from the thread, which is reading it.
- * The other consumers are implemented as instances of {@link Observer}. A
- * typical application may be the generation of a {@link MessageDigest} on the
- * fly.
- * {@code Note}: The {@link ObservableInputStream} is not thread safe,
- * as instances of InputStream usually aren't.
- * If you must access the stream from multiple threads, then synchronization, 
locking,
- * or a similar means must be used.
- * @see MessageDigestCalculatingInputStream
- */
-public class ObservableInputStream extends ProxyInputStream {
-public static abstract class Observer {
-/** Called to indicate, that {@link InputStream#read()} has been 
invoked
- * on the {@link ObservableInputStream}, and will return a value.
- * @param pByte The value, which is being returned. This will never be 
-1 (EOF),
- *because, in that case, {link #finished()} will be invoked 
instead.
- */
-void data(int pByte) throws IOException {}
-/** Called to indicate, that {@link InputStream#read(byte[])}, or
- * {@link InputStream#read(byte[], int, int)} have been called, and 
are about to
- * invoke data.
- * @param pBuffer The byte array, which has been passed to the read 
call, and where
- *   data has been stored.
- * @param pOffset The offset within the byte array, where data has 
been stored.
- * @param pLength The number of bytes, which have been stored in the 
byte array.
- */
-void data(byte[] pBuffer, int pOffset, int pLength) throws IOException 
{}
-/** Called to indicate, that EOF has been seen on the underlying 
stream.
- * This method may be called multiple times, if the reader keeps 
invoking
- * either of the read methods, and they will consequently keep 
returning
- * EOF.
- */
-void finished() throws IOException {}
-/** Called to indicate, that the {@link ObservableInputStream} has 
been closed.
- */
-void closed() throws IOException {}
-/**
- * Called to indicate, that an error occurred on the underlying stream.
- */
-void error(IOException pException) throws IOException { throw 
pException; }
-}
-
-private final List observers = new ArrayList();
-
-public 

svn commit: r1761521 - in /commons/proper/vfs/trunk: examples/src/main/java/org/apache/commons/vfs2/example/ sandbox/src/main/java/org/apache/commons/vfs2/provider/mime/

2016-09-19 Thread ggregory
Author: ggregory
Date: Tue Sep 20 05:43:24 2016
New Revision: 1761521

URL: http://svn.apache.org/viewvc?rev=1761521=rev
Log:
Remove redundant type arguments.

Modified:

commons/proper/vfs/trunk/examples/src/main/java/org/apache/commons/vfs2/example/Shell.java

commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs2/provider/mime/MimeAttributesMap.java

commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs2/provider/mime/MimeFileObject.java

Modified: 
commons/proper/vfs/trunk/examples/src/main/java/org/apache/commons/vfs2/example/Shell.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/examples/src/main/java/org/apache/commons/vfs2/example/Shell.java?rev=1761521=1761520=1761521=diff
==
--- 
commons/proper/vfs/trunk/examples/src/main/java/org/apache/commons/vfs2/example/Shell.java
 (original)
+++ 
commons/proper/vfs/trunk/examples/src/main/java/org/apache/commons/vfs2/example/Shell.java
 Tue Sep 20 05:43:24 2016
@@ -163,8 +163,8 @@ public final class Shell
 System.out.println("Default manager: \"" + 
mgr.getClass().getName() + "\" " +
"version " + getVersion(mgr.getClass()));
 String[] schemes = mgr.getSchemes();
-List virtual = new ArrayList();
-List physical = new ArrayList();
+List virtual = new ArrayList<>();
+List physical = new ArrayList<>();
 for (int i = 0; i < schemes.length; i++)
 {
 Collection caps = 
mgr.getProviderCapabilities(schemes[i]);
@@ -417,7 +417,7 @@ public final class Shell
 {
 return null;
 }
-final ArrayList cmd = new ArrayList();
+final ArrayList cmd = new ArrayList<>();
 final StringTokenizer tokens = new StringTokenizer(line);
 while (tokens.hasMoreTokens())
 {

Modified: 
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs2/provider/mime/MimeAttributesMap.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs2/provider/mime/MimeAttributesMap.java?rev=1761521=1761520=1761521=diff
==
--- 
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs2/provider/mime/MimeAttributesMap.java
 (original)
+++ 
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs2/provider/mime/MimeAttributesMap.java
 Tue Sep 20 05:43:24 2016
@@ -47,7 +47,7 @@ public class MimeAttributesMap implement
 
 private final Log log = LogFactory.getLog(MimeAttributesMap.class);
 private final Part part;
-private final Map mimeMessageGetters = new TreeMap();
+private final Map mimeMessageGetters = new TreeMap<>();
 
 private Map backingMap;
 
@@ -96,7 +96,7 @@ public class MimeAttributesMap implement
 private Map createMap()
 {
 // Object is either a String, or a List of Strings
-final Map ret = new TreeMap();
+final Map ret = new TreeMap<>();
 
 Enumeration headers;
 try
@@ -125,7 +125,7 @@ public class MimeAttributesMap implement
 }
 else if (values instanceof String)
 {
-final ArrayList newValues = new ArrayList();
+final ArrayList newValues = new ArrayList<>();
 newValues.add((String) values);
 newValues.add(header.getValue());
 ret.put(headerName, newValues);

Modified: 
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs2/provider/mime/MimeFileObject.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs2/provider/mime/MimeFileObject.java?rev=1761521=1761520=1761521=diff
==
--- 
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs2/provider/mime/MimeFileObject.java
 (original)
+++ 
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs2/provider/mime/MimeFileObject.java
 Tue Sep 20 05:43:24 2016
@@ -157,7 +157,7 @@ public class MimeFileObject
 return null;
 }
 
-final List vfs = new ArrayList();
+final List vfs = new ArrayList<>();
 if (isMultipart())
 {
 final Object container = part.getContent();




[1/2] [lang] LANG-1267: Add test showing that XXX does work when specifing formats

2016-09-19 Thread britter
Repository: commons-lang
Updated Branches:
  refs/heads/master ff2672a57 -> 64d820bff


LANG-1267: Add test showing that XXX does work when specifing formats


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/bdb07461
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/bdb07461
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/bdb07461

Branch: refs/heads/master
Commit: bdb074610c87a210ea4c0d91d579cb4558f4b19f
Parents: ff2672a
Author: Benedikt Ritter 
Authored: Mon Sep 19 10:45:58 2016 +0200
Committer: Benedikt Ritter 
Committed: Mon Sep 19 10:45:58 2016 +0200

--
 .../org/apache/commons/lang3/time/FastDateFormatTest.java | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/bdb07461/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
--
diff --git 
a/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java 
b/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
index 41fd60a..912cbe9 100644
--- a/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
@@ -319,5 +319,10 @@ public class FastDateFormatTest {
 
 dateAsString = FastDateFormat.getInstance("dd/MM/", utc, 
Locale.US).format(date);
 Assert.assertEquals("17/08/292278994", dateAsString);
-}  
+}
+
+@Test
+public void testLANG_1267() throws Exception {
+FastDateFormat.getInstance("-MM-dd'T'HH:mm:ss.SSSXXX");
+}
 }



[2/2] [lang] Gather issue related tests at the bottom

2016-09-19 Thread britter
Gather issue related tests at the bottom


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/64d820bf
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/64d820bf
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/64d820bf

Branch: refs/heads/master
Commit: 64d820bffae723b9c8669301b246ae199db61b5c
Parents: bdb0746
Author: Benedikt Ritter 
Authored: Mon Sep 19 10:46:52 2016 +0200
Committer: Benedikt Ritter 
Committed: Mon Sep 19 10:46:52 2016 +0200

--
 .../commons/lang3/time/FastDateFormatTest.java| 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/64d820bf/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
--
diff --git 
a/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java 
b/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
index 912cbe9..a4619dc 100644
--- a/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
@@ -221,15 +221,6 @@ public class FastDateFormatTest {
 FastDateFormat.getDateTimeInstance(FastDateFormat.LONG, 
FastDateFormat.MEDIUM, TimeZone.getDefault(), Locale.getDefault()));
 }
 
-/**
- * According to LANG-954 (https://issues.apache.org/jira/browse/LANG-954) 
this is broken in Android 2.1.
- */
-@Test
-public void testLang954() {
-final String pattern = "-MM-dd'T'";
-FastDateFormat.getInstance(pattern);
-}
-
 @Test
 public void testParseSync() throws InterruptedException {
 final String pattern = "-MM-dd'T'HH:mm:ss.SSS";
@@ -309,6 +300,15 @@ public class FastDateFormatTest {
 return totalElapsed;
 }
 
+/**
+ * According to LANG-954 (https://issues.apache.org/jira/browse/LANG-954) 
this is broken in Android 2.1.
+ */
+@Test
+public void testLANG_954() {
+final String pattern = "-MM-dd'T'";
+FastDateFormat.getInstance(pattern);
+}
+
 @Test
 public void testLANG_1152() {
 TimeZone utc = TimeZone.getTimeZone("UTC");



[lang] Revert parts of LANG-1134 to polish the API after 3.5

2016-09-19 Thread britter
Repository: commons-lang
Updated Branches:
  refs/heads/master 64d820bff -> 09686fad4


Revert parts of LANG-1134 to polish the API after 3.5


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/09686fad
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/09686fad
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/09686fad

Branch: refs/heads/master
Commit: 09686fad46d49016057bae8f02dc79f409b7bd10
Parents: 64d820b
Author: Benedikt Ritter 
Authored: Mon Sep 19 11:46:19 2016 +0200
Committer: Benedikt Ritter 
Committed: Mon Sep 19 11:46:19 2016 +0200

--
 src/changes/changes.xml |   2 +-
 .../java/org/apache/commons/lang3/Validate.java | 668 ---
 .../org/apache/commons/lang3/ValidateTest.java  | 612 -
 3 files changed, 1 insertion(+), 1281 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/09686fad/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index d3a52fe..bc720f7 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -89,7 +89,7 @@ The  type attribute can be add,update,fix,remove.
 EqualsBuilder.append(Object,Object) is too big to be inlined, which 
prevents whole builder to be scalarized
 NumberUtils.createNumber() behaves inconsistently with 
NumberUtils.isNumber()
 Add support for varargs in ConstructorUtils, MemberUtils, and 
MethodUtils
-New 
methods for lang3.Validate
+Add 
methods to check numbers against NaN and inifinite to Validate
 Fix 
for incorrect comment on StringUtils.containsIgnoreCase method
 Fix typo on appendIfMissing javadoc
 Add tests for missed branches in DateUtils

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/09686fad/src/main/java/org/apache/commons/lang3/Validate.java
--
diff --git a/src/main/java/org/apache/commons/lang3/Validate.java 
b/src/main/java/org/apache/commons/lang3/Validate.java
index b70ddd5..da20da4 100644
--- a/src/main/java/org/apache/commons/lang3/Validate.java
+++ b/src/main/java/org/apache/commons/lang3/Validate.java
@@ -972,674 +972,6 @@ public class Validate {
 }
 }
 
-// greater
-
//-
-
-/**
- * Validates that the specified argument is strictly greater than a 
given
- * reference; otherwise throwing an exception.
- *
- * Validate.greaterObject(myObject, refObject);
- *
- * The message of the exception is The value {@code value} is not
- * greater than {@code min}.
- *
- * @param   the type of the argument object
- * @param value  the object to validate
- * @param min  the reference value
- * @throws IllegalArgumentException if {@code value} is smaller than or 
equal to {@code min}
- * @see #greaterObject(java.lang.Object, java.lang.Comparable, 
java.lang.String, java.lang.Object...) 
- * 
- * @since 3.5
- */
-public static  void greaterObject(final Comparable value, final T 
min) {
-greaterObject(value, min, DEFAULT_GREATER_EX_MESSAGE, value, min);
-}
-
-/**
- * Validates that the specified argument is strictly greater than a 
given
- * reference; otherwise throwing an exception with the specified 
message.
- *
- * Validate.greaterObject(myObject, refObject, "The value must be 
greater than the reference");
- *
- * @param   the type of the argument object
- * @param value  the object to validate
- * @param min  the reference value
- * @param message  the {@link String#format(String, Object...)} exception 
message if invalid, not null
- * @param values  the optional values for the formatted exception message
- * @throws IllegalArgumentException if {@code value} is smaller than or 
equal to {@code min}
- * @see #greaterObject(java.lang.Object, java.lang.Comparable) 
- * 
- * @since 3.5
- */
-public static  void greaterObject(final Comparable value, final T 
min, final String message, final Object... values) {
-if (value.compareTo(min) <= 0) {
-throw new IllegalArgumentException(String.format(message, values));
-}
-}
-
-/**
- * Validates that the specified argument is strictly greater than a 
given
- * reference; otherwise throwing an exception.
- *
- * Validate.greater(myLong, 0);
- *
- * The message of the exception is The value {@code value} is not
- * greater than {@code min}.
- *
- * @param value  the value to validate
- * @param min  the