Commit Graph

5280 Commits

Author SHA1 Message Date
Gary Gregory fed91a0559 Format JUnit failure message. Tweaks. 2020-07-23 11:11:51 -04:00
Gary Gregory 8333f7e7ba Update biz.aQute.bndlib from 5.1.1 to 5.1.2 #592. 2020-07-23 10:08:44 -04:00
Gary Gregory ff3d7c2325 Reduce wait time in test. 2020-07-23 10:05:52 -04:00
Gary Gregory cb9a59cabb Update spotbugs-maven-plugin from 4.0.0 to 4.0.4. 2020-07-23 09:27:47 -04:00
Gary Gregory 37de491eb3 Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-lang.git 2020-07-23 09:25:02 -04:00
Gary Gregory 3276da82f0 Better names in test. Use final. Sort members. 2020-07-23 09:24:53 -04:00
Alex Herbert ba7505d9a9 LANG-1592: Correct implementation of RandomUtils.nextLong(long, long)
The method has been changed to use exclusively the long datatype to
generate the value.

The implementation is taken from the Commons RNG project.
2020-07-22 22:02:07 +01:00
Gary Gregory b99969ca8a Enable Dependabot #587. 2020-07-22 10:10:07 -04:00
Alex Herbert 2957f33b6f Javadoc fix 2020-07-21 08:21:55 +01:00
Alex Herbert 2242b6f2ca Remove javadoc reference to private constructor 2020-07-21 08:20:23 +01:00
Gary Gregory deaed63d51 Update versions for 3.12. 2020-07-20 11:37:23 -04:00
Gary Gregory dfec50030f Use Maven generated changes-report for the release history. 2020-07-20 11:34:45 -04:00
Gary Gregory 1bf70c5c96 Use Maven generated changes-report for the release history. 2020-07-20 11:15:44 -04:00
Bruno P. Kinoshita 53529d8f49 [LANG-1591]: add changes.xml entry 2020-07-20 21:19:44 +12:00
Bruno P. Kinoshita 984bb2b585 Merge branch 'pr-585'
This closes #585
2020-07-20 21:11:34 +12:00
B Sharma 61c575afac Remove redudant argument from substring call 2020-07-20 10:41:09 +05:30
Gary Gregory e803396263 Add slot for next release. 2020-07-18 17:31:56 -04:00
Gary Gregory 031c1d0b8c Fix download link. 2020-07-18 08:37:57 -04:00
Gary Gregory 6d9102ab92 Revert "Format tweak."
This reverts commit c56be9c3dd.
2020-07-17 08:51:55 -04:00
Gary Gregory c56be9c3dd Format tweak. 2020-07-16 19:23:10 -04:00
Gary Gregory bc4b945bde Prepare for 3.11 site. 2020-07-16 09:07:00 -04:00
Gary Gregory fe95edd45f Prepare for 3.11-RC2. 2020-07-12 08:59:56 -04:00
Rob Tompkins 3d8408776e (docs) minor nits and whitespace addions for readability 2020-07-12 08:43:32 -04:00
Rob Tompkins 19f5632919 (docs) Add citations to LockingVisitors javadoc 2020-07-12 08:14:24 -04:00
Rob Tompkins 669f6833e3
(docs) formatting nit 2020-07-11 17:24:29 -04:00
Gary Gregory 92d6be66ff Whitespace and lambda clean ups. 2020-07-11 17:21:25 -04:00
Gary Gregory 5283344927 Added missing Javadoc and tweaked another Javadoc. 2020-07-11 17:16:31 -04:00
Gary Gregory 3e86896c13 Format. 2020-07-11 16:54:07 -04:00
Gary Gregory ff4ef533a5 Redo this class after Rob Tompkins found a bug.
Much simpler now as well.
2020-07-11 16:39:14 -04:00
Gary Gregory ab627f97bc Prepare for 3.11-RC1. 2020-07-10 19:29:13 -04:00
Gary Gregory 2296d0bb14 Fix Javadoc. 2020-07-10 12:11:01 -04:00
Gary Gregory d5c29230d8 [LANG-1539] Add allNull() and anyNull() methods to ObjectUtils. #522. 2020-07-10 11:57:58 -04:00
Gary Gregory 1a77a547dd
Add allNull() and anyNull() methods to ObjectUtils, as well as their associated tests. (#522) 2020-07-10 11:56:01 -04:00
Gary Gregory 4f9be0faab Checkstyle. 2020-07-10 11:49:00 -04:00
Gary Gregory 265b74aac7 Format new class. 2020-07-10 11:47:45 -04:00
Isira Seneviratne ee6c682ed5 Add allNull() and anyNull() methods to ObjectUtils, as well as their associated tests. 2020-07-10 09:53:26 +05:30
Gary Gregory 1fc15b43d4 Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-lang.git 2020-07-09 21:27:56 -04:00
Gary Gregory 9dbabe2494 Correct Javadocs of methods that use Validate.notNull() and replace some
uses of Validate.isTrue() with Validate.notNull(). #525.
2020-07-09 21:27:42 -04:00
Isira Seneviratne 3700641b4e
Correct Javadocs of methods that use Validate.notNull() and replace some uses of Validate.isTrue() with Validate.notNull(). (#525)
* Update Javadocs of methods that call Validate.notNull() to refer to NullPointerException instead of IllegalArgumentException for null values.

* Use Validate.notNull() instead of Validate.isTrue() to check for null values, and update the associated tests to check for NullPointerException instead of IllegalArgumentException.
2020-07-09 21:26:19 -04:00
Gary Gregory 039c5293a1 Clean up after merge. Class rename and package rename did not come
through.
2020-07-09 08:38:19 -04:00
Gary Gregory 3243638167
Stamped lock visitor (#559)
Co-authored-by: Gary Gregory <gardgregory@gmail.com>
2020-07-09 08:28:25 -04:00
Gary Gregory 32a9a350c6 org.junit.jupiter:junit-jupiter 5.6.1 -> 5.6.2. 2020-07-04 09:45:02 -04:00
Gary Gregory 065662fcf3 com.puppycrawl.tools:checkstyle 8.33 -> 8.34. 2020-07-04 09:42:32 -04:00
Gary Gregory ad433ecc16 Make internal API null-safe and Javadoc. 2020-07-01 17:21:55 -04:00
Gary Gregory 954338a152 Sort 2 methods. 2020-07-01 17:07:09 -04:00
Gary Gregory f89a85b051 [LANG-1543] [JSON string for maps] ToStringBuilder.reflectionToString
doesnt render nested maps correctly.
2020-06-28 09:49:12 -04:00
Gary Gregory 5e71a4add5 [LANG-1543] [JSON string for maps] ToStringBuilder.reflectionToString
doesnt render nested maps correctly.

Apply a different version of the PR
https://github.com/apache/commons-lang/pull/561

Closes #561.
2020-06-28 09:40:45 -04:00
Gary Gregory 4063df71c3 [LANG-1543] [JSON string for maps] ToStringBuilder.reflectionToString
doesnt render nested maps correctly.

Apply a different version of the PR
https://github.com/apache/commons-lang/pull/561

Closes #561.
2020-06-28 09:38:52 -04:00
Gary Gregory 062bc6fe7d Add Add org.apache.commons.lang3.StringUtils.substringAfterLast(String,
int).
2020-06-27 09:32:30 -04:00
Gary Gregory 75fa90e96c Use final. 2020-06-27 09:24:58 -04:00
Gary Gregory d68a7a4189 Add org.apache.commons.lang3.StringUtils.substringAfter(String, int). 2020-06-27 09:24:06 -04:00
Gary Gregory 1621a23d2b Make org.apache.commons.lang3.CharSequenceUtils.toCharArray(CharSequence)
public.
2020-06-26 15:32:13 -04:00
Gary Gregory 10f6a80c96 No need to nest. 2020-06-26 15:31:00 -04:00
Gary Gregory bb017e0d4d JRE locks live in a ...concurrent.locks package so let's put our lock
code in our own ...concurrent.locks.
2020-06-26 14:35:14 -04:00
Gary Gregory 46a081d69c Javadocs, imports. 2020-06-26 10:33:37 -04:00
Gary Gregory d18fb1abdf JRE locks live in a ...concurrent.lock package so let's put our lock
code in our own ...concurrent.lock
2020-06-26 09:04:17 -04:00
Rob Tompkins eee51821a8 fix: nit in my changes.xml formatting 2020-06-26 06:15:23 -04:00
Rob Tompkins e5108df458 Thanks Jin for refining the test output for FastDateParserTest
Signed-off-by: Rob Tompkins <chtompki@apache.org>
2020-06-26 06:12:51 -04:00
Rob Tompkins c79e548fc4 Merge branch 'fix_FastDateParserTest' of https://github.com/XenoAmess/commons-lang 2020-06-26 06:00:05 -04:00
Jochen Wiedmann bf7aa89ca4 Adding Javadocs for the Locks.Lock class. Improvements in the test suite. 2020-06-26 05:53:15 -04:00
Rob Tompkins acaf458278 LANG-1549: Thanks Jin 2020-06-26 05:52:48 -04:00
XenoAmess e04966a612 refine tests 2020-06-26 05:52:48 -04:00
XenoAmess 249d9e4744 refine tests 2020-06-26 05:52:48 -04:00
XenoAmess a9dea5e5c4 refine tests 2020-06-26 05:52:48 -04:00
XenoAmess d02958ca09 refine tests 2020-06-26 05:52:48 -04:00
XenoAmess bbc2e7ee85 refine tests 2020-06-26 05:52:48 -04:00
XenoAmess 00ecd339bd fix checkstyle 2020-06-26 05:52:48 -04:00
XenoAmess 73438e431e fix checkstyle 2020-06-26 05:52:48 -04:00
XenoAmess 05724b2baa reformat test 2020-06-26 05:52:48 -04:00
XenoAmess 217da1e6aa implement lastIndexOf 2020-06-26 05:52:48 -04:00
XenoAmess dee8f6fb84 implement lastIndexOf 2020-06-26 05:52:48 -04:00
XenoAmess 68cb8af7e4 Revert "performance improve."
This reverts commit 3b05b95a
2020-06-26 05:52:48 -04:00
XenoAmess 3ef823e8e1 performance improve. 2020-06-26 05:52:48 -04:00
XenoAmess 567388428c performance improve. 2020-06-26 05:52:48 -04:00
XenoAmess c7c2dd783a Merge branch 'master' of https://github.com/apache/commons-lang into fix_FastDateParserTest 2020-06-26 16:55:41 +08:00
XenoAmess dd5d284e86 refine tests 2020-06-26 16:54:16 +08:00
Gary Gregory b69c4759ed [LANG-1568] Javadoc. 2020-06-25 13:57:28 -04:00
Gary Gregory 268d4936d4 [LANG-1568] Predicate or. 2020-06-25 10:52:37 -04:00
Gary Gregory 180d948d7f [LANG-1568] Predicate add. 2020-06-25 10:42:13 -04:00
Gary Gregory c7d709b220 [LANG-1568] Predicate negation and clean ups. 2020-06-25 10:29:57 -04:00
Gary Gregory a881c3e226 [LANG-1568] Predicate negation. 2020-06-25 10:19:10 -04:00
Gary Gregory 00c8096cbf [LANG-1568] Complete FailableFunction. 2020-06-25 09:44:22 -04:00
Gary Gregory 9273b557b7 [LANG-1568] Checktyle. 2020-06-25 09:32:14 -04:00
Gary Gregory 487f5887bb [LANG-1568] Javadoc. 2020-06-25 09:17:49 -04:00
Gary Gregory e12eb5d4d7 [LANG-1568] FailableDoubleUnaryOperator, FailableIntUnaryOperator,
FailableLongUnaryOperator.
2020-06-25 09:01:13 -04:00
Gary Gregory 5f2fa64137 Checktyle. 2020-06-25 08:46:50 -04:00
Gary Gregory 97611fda5d [LANG-1568] Lambda clean ups. 2020-06-24 20:28:44 -04:00
Gary Gregory d4ccd259d9 [LANG-1568] More checked andThen() implementations to mirror the JRE
functional interfaces.
2020-06-24 20:10:46 -04:00
Gary Gregory 47fb776792 [LANG-1568]
org.apache.commons.lang3.function.FailableConsumer.andThen(FailableConsumer<?
super T, E>)
2020-06-24 18:40:25 -04:00
Gary Gregory c7aea90a7a [LANG-1568]
org.apache.commons.lang3.function.FailableBiFunction.andThen(FailableFunction<?
super R, ? extends V, E>)
2020-06-24 18:25:47 -04:00
Gary Gregory 4badcde7f7 [LANG-1568]
org.apache.commons.lang3.function.FailableBiConsumer.andThen(FailableBiConsumer<?
super T, ? super U, E>)
2020-06-24 17:03:17 -04:00
Gary Gregory e7c421ff35 [LANG-1568]
org.apache.commons.lang3.function.FailableBiConsumer.andThen(FailableBiConsumer<?
super T, ? super U, E>)
2020-06-24 17:02:35 -04:00
Gary Gregory 9173173699 [LANG-1568]
org.apache.commons.lang3.function.FailableBiConsumer.andThen(FailableBiConsumer<?
super T, ? super U, E>)
2020-06-24 16:58:52 -04:00
Gary Gregory 4cf50486a3 Use the same generic parameter names as the JRE. 2020-06-24 13:00:21 -04:00
Gary Gregory 1861ab9388 Use the same generic parameter names as the JRE. 2020-06-24 12:51:04 -04:00
Gary Gregory cae8364d9e Use final. 2020-06-24 10:55:15 -04:00
Gary Gregory c5c839ff82 Whitespace. 2020-06-24 10:54:37 -04:00
Gary Gregory 05803b0d58 Add JavaVersion enum constants for Java 16.
Tested with:
openjdk version "16-ea" 2021-03-16
OpenJDK Runtime Environment (build 16-ea+2-35)
OpenJDK 64-Bit Server VM (build 16-ea+2-35, mixed mode, sharing)
2020-06-24 10:53:55 -04:00
Gary Gregory c10c62ed73 Fix boxing/unboxing. 2020-06-24 10:47:00 -04:00
Gary Gregory 94d5208dd9 Fix boxing/unboxing. 2020-06-24 10:44:46 -04:00
Gary Gregory fb184a7650 Clean up imports. 2020-06-24 10:43:04 -04:00
Gary Gregory c56c77ed95 Remove methods that will be new in 3.11 but which are now in the
function package.
2020-06-24 10:41:19 -04:00
Gary Gregory 1dddec8ba8 [LANG-1542] ToStringBuilder.reflectionToString - Wrong JSON format when
object has a List/Array of Enum.
2020-06-24 09:26:11 -04:00
Gary Gregory deb5f817af Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-lang.git 2020-06-24 08:50:07 -04:00
Gary Gregory f070987f5d [LANG-1567] Fix Javadocs for EqualsBuilder#setTestRecursive() #556. 2020-06-24 08:49:58 -04:00
Miguel Muñoz a7be33e9c6
Fixed Javadocs for setTestRecursive() (#556) 2020-06-24 08:46:21 -04:00
Gary Gregory dc54284ee7 Javadoc. 2020-06-24 08:44:16 -04:00
Gary Gregory a14b28923e Clean ups.
- Fix Javadoc
- Simplify error message
- Rmove on layer of API call.
2020-06-24 08:42:16 -04:00
Gary Gregory c26c72f8a8 Add ObjectUtils.toString(Object, Supplier<String>). 2020-06-23 15:15:38 -04:00
Gary Gregory 45b32d3a9c Sort members. 2020-06-23 15:10:54 -04:00
Gary Gregory 6315e8c138 Javadoc. 2020-06-23 14:22:46 -04:00
Gary Gregory 341aaa797d Added ImmutablePair factory methods left() and right(). 2020-06-23 11:07:22 -04:00
Gary Gregory 744da0e255 Update dependencies.
- org.apache.commons:commons-parent 50 -> 51
- biz.aQute.bnd:biz.aQute.bndlib 5.1.0 -> 5.1.1
- com.github.spotbugs:spotbugs 4.0.4 -> 4.0.5
2020-06-23 10:40:33 -04:00
Gary Gregory 5ffe008074 Undo "fix", @DefaultLocale is used in this test. 2020-06-22 09:32:10 -04:00
Gary Gregory 91dafbcea8 Fix typos. 2020-06-22 09:29:31 -04:00
Gary Gregory 64b2f90d20 Fix bug in test. 2020-06-22 09:28:58 -04:00
Gary Gregory b7b4ae33dc Formatting. 2020-06-22 09:15:29 -04:00
Gary Gregory 4d403b4ff3 Formatting. 2020-06-22 09:14:34 -04:00
Gary Gregory e291a601db Formatting. 2020-06-22 08:52:25 -04:00
XenoAmess acb237c52d add a single test for showing up the problem 2020-06-20 01:41:01 +08:00
XenoAmess 5b350aa33b refine test output for FastDateParserTest 2020-06-20 00:57:18 +08:00
Gary Gregory 6363fced4b Better method names. 2020-06-19 11:06:52 -04:00
Gary Gregory a33b86e61f Better method names. 2020-06-19 11:03:14 -04:00
Gary Gregory 45e38e91f9 Better method names. 2020-06-19 11:02:54 -04:00
Gary Gregory bb270696fd Tests are public by convention on Commons Lang. 2020-06-18 12:49:40 -04:00
Gary Gregory ed0f5bea11 Reimplement such that locking and unlocking take place in the same
method.
2020-06-18 12:48:46 -04:00
Gary Gregory f05c39b6e4 Use names that reflect the functional interface in use. 2020-06-18 12:36:00 -04:00
Gary Gregory d22f4e1e61 Clean up generics. 2020-06-18 08:16:51 -04:00
aherbert 4453bb3ede Fix @since for new o.a.c.lang3.stream.Streams class.
This replaces o.a.c.lang3.Streams.
2020-06-18 12:13:15 +01:00
aherbert 3302d5040b Correct code example in javadoc header 2020-06-18 12:10:20 +01:00
aherbert 5d675a0e29 Add skeleton package-info 2020-06-18 12:09:50 +01:00
aherbert 093dd682d2 Remove redundant import 2020-06-18 11:49:20 +01:00
aherbert f53ff8cc20 Checkstyle: new line at end of file 2020-06-18 11:48:12 +01:00
aherbert abf6899e07 Use upper case L on long declarations 2020-06-18 11:46:51 +01:00
aherbert 46acdde8bd Fix comment typos 2020-06-18 09:25:25 +01:00
Gary Gregory 8fcefb4f98 Centralize stream code in our own 'stream' package as
a parallel to the JRE's java.util.stream package.

- Re-implement use of failable function interfaces based on our function
package.
- Deprecate old class.
- Remove trainling whitespace.
2020-06-17 17:37:14 -04:00
Gary Gregory 724c00f0e8 Follow current style: @Test methods are public. 2020-06-17 17:16:19 -04:00
Gary Gregory e22a5ea87a Javadoc. 2020-06-17 17:13:40 -04:00
Gary Gregory fc686a48ef We have a concurrent package, and JRE locks live in a similar package,
so let's put our new code in there.
2020-06-17 16:53:15 -04:00
Gary Gregory 7ba418fc6f Centralize failable functional interfaces in our 'function' package as
the parallel to the JRE's java.util.function package.

Deprecate old class.
2020-06-17 16:46:10 -04:00
Gary Gregory 5d1a5517c9 Fix checkstyle: End files in a new line. 2020-06-17 16:38:47 -04:00
Gary Gregory 74d8ad5c2c Add missing @Deprecated. 2020-06-17 16:22:05 -04:00
Gary Gregory 8b54728564 Create the new package org.apache.commons.function to parallel the JRE's
java.util.function to provide home for our "failable" version of the
JRE's functional interfaces.
2020-06-17 15:58:26 -04:00
Gary Gregory 9214c65371 Merge conditions using the same blocks. 2020-06-17 11:05:04 -04:00
Gary Gregory 36111ba582 [LANG-1568] More failable functional interfaces to match JRE functional
interfaces.
2020-06-17 09:30:21 -04:00
Bruno P. Kinoshita 79adb9f677 [LANG-1546]: add changelog 2020-06-16 14:15:06 +12:00
Gary Gregory 438716a839 Add edge case. 2020-06-15 09:17:23 -04:00
Gary Gregory 7f90306f90 [LANG-1568] More failable functional interfaces to match JRE functional
interfaces.
2020-06-14 19:27:23 -04:00
Gary Gregory 133327272a Sort members. 2020-06-14 14:59:02 -04:00
Gary Gregory 9d1c7bc17c LANG-1557] Change a Pattern to a static final field, for not letting it
compile each time the function invoked. #542
2020-06-14 09:47:49 -04:00
XenoAmess 677604fb84
[LANG-1557] Change a Pattern to a static final field, for not letting it compile each time the function invoked. (#542)
* Pattern_to_static_

* move the constants to head of the file.

* Simplify private comment.

Co-authored-by: Gary Gregory <garydgregory@users.noreply.github.com>
2020-06-14 09:46:53 -04:00
Gary Gregory 7852ed9d4d Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-lang.git 2020-06-14 09:44:59 -04:00
Gary Gregory ab7b6734d3 [LANG-1565] change removeLastFieldSeparator to use endsWith #550. 2020-06-14 09:44:53 -04:00
XenoAmess 1406f67252
[LANG-1565] change removeLastFieldSeparator to use endsWith (#550)
* change_removeLastFieldSeparator_to_use_endsWith

* stylecheck

* revert mis-changes about orders of imports.
2020-06-14 09:43:59 -04:00
XenoAmess 9fcd9c86ed fix checkstyle. 2020-06-14 11:31:41 +12:00
Gary Gregory e2c0396660 [LANG-1556] Use Java 8 lambdas and Map operations. #541 2020-06-13 18:34:51 -04:00
XenoAmess 797d550a92
[LANG-1556] Use Java 8 lambdas and Map operations. (#541)
* java8

* refine

* rebase
2020-06-13 18:33:29 -04:00
Gary Gregory 78c1c7f9ab [LANG-1570] JavaVersion enum constants for Java 14 and 15. #553. 2020-06-13 18:32:37 -04:00
Gary Gregory 4e3151a8ff [LANG-1570] JavaVersion enum constants for Java 14 and 15. #553. 2020-06-13 18:31:58 -04:00
Gary Gregory 98eda51817 Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-lang.git 2020-06-13 18:30:50 -04:00
Edgar Asatryan 31d7eea1c6
[LANG-1570] JavaVersion enum constants for Java 14 and 15. (#553) 2020-06-13 18:30:38 -04:00
Gary Gregory 306dbb0cb0 Add missiing "test 2020-06-13 16:06:26 -04:00
Gary Gregory 628044f75a Sort methods. 2020-06-13 16:04:57 -04:00
Edgar Asatryan 496eb10372
Use ArrayUtils::isArrayIndexValid method in ArrayUtils::get. (#552) 2020-06-13 14:05:33 -04:00
Gary Gregory 553a3a75df [LANG-1528] StringUtils.replaceEachRepeatedly gives
IllegalStateException #505.
2020-06-13 11:33:08 -04:00
Edwin Delgado H d62d4e21ef
[LANG-1528] replaceEachRepeatedly gives IllegalStateException (#505)
* Fix https://issues.apache.org/jira/browse/LANG-1528

* Fix https://issues.apache.org/jira/browse/LANG-1528

Co-authored-by: Edwin DH <peo_ehuaynalaya@uolinc.com>
2020-06-13 11:31:07 -04:00
Gary Gregory 995dba307c [LANG-1559] convert Sting to StringBuilder in some test code. #544. 2020-06-13 11:20:23 -04:00
XenoAmess 48ee23a7dd
Sting_to_StringBuilder (#544) 2020-06-13 11:19:29 -04:00
Gary Gregory 1e0b744dd2 [LANG-1558] Simplify if as some conditions are covered by others #543. 2020-06-13 11:18:27 -04:00
XenoAmess fb2d228380
simplify_if (#543) 2020-06-13 11:17:52 -04:00
Gary Gregory a9be3ec55b [LANG-1555] Ignored exception `ignored`, should not be called so #540. 2020-06-13 11:15:29 -04:00
XenoAmess 29b87d5cea
it_shall_not_named_`ignored`_ (#540) 2020-06-13 11:14:45 -04:00
Gary Gregory 0eb4a8f87f [LANG-1554] Fix typos #539. 2020-06-13 11:12:24 -04:00
XenoAmess 0e17c1e93c
fix_typos (#539) 2020-06-13 11:11:17 -04:00
Gary Gregory 7f3b3562a7 Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-lang.git 2020-06-13 11:09:09 -04:00
Gary Gregory 57d4777d28 [LANG-1552] Change from addAll to constructors for some List #536. 2020-06-13 11:09:03 -04:00
XenoAmess 6dd1cf3c6d
addAll_to_constructor (#536) 2020-06-13 11:08:33 -04:00
Gary Gregory 367f39ee29 [LANG-1553] Change array style from `int a[]` to `int[] a` #537. 2020-06-13 11:06:56 -04:00
XenoAmess 2238145f56
array_style (#537) 2020-06-13 11:06:06 -04:00
Gary Gregory 514f226b7d Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-lang.git 2020-06-13 11:04:58 -04:00
Gary Gregory dc35ebc48c [LANG-1560] Refine Javadoc #545. 2020-06-13 11:04:52 -04:00
XenoAmess 8e61b090ce
fix javadoc (#545) 2020-06-13 11:04:11 -04:00
Gary Gregory a21cdb5121 [LANG-1564] Use Collections.singletonList insteadof Arrays.asList when
there be only one element. #549.
2020-06-13 10:58:39 -04:00
XenoAmess f2d376ae01
[LANG-1564] use Collections.singletonList insteadof Arrays.asList when there be only one element. (#549)
* asList

* Update TypeUtilsTest.java
2020-06-13 10:57:51 -04:00
Gary Gregory 386c1e2f37 Simplify lambdas. 2020-06-13 10:55:46 -04:00
Gary Gregory 2f7a3a8118 [LANG-1562] use Math.max and min #547. 2020-06-13 10:51:05 -04:00
XenoAmess 9078cdc8c4
use_Math_max_min (#547) 2020-06-13 10:49:59 -04:00
Gary Gregory 34fcd18ae7 [LANG-1563] use StandardCharsets.UTF_8 #548. 2020-06-13 10:46:58 -04:00
XenoAmess 011c8bdc92
[LANG-1563] use StandardCharsets.UTF_8 (#548)
* use_StandardCharsets_UTF_8

* Update StringEscapeUtilsTest.java
2020-06-13 10:46:16 -04:00
Gary Gregory 1c00d14d37 Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-lang.git 2020-06-13 10:45:19 -04:00
Gary Gregory 773f276c23 [LANG-1561] Use List.sort instead of Collection.sort #546. 2020-06-13 10:45:08 -04:00
XenoAmess 7651124bec
[LANG-1561] use List.sort instead of Collection.sort (#546)
* use_List_sort

* Update MethodUtils.java

* Update ObjectToStringComparatorTest.java
2020-06-13 10:44:05 -04:00
Gary Gregory 2d21e19f06 [LANG-1550] Optimize ArrayUtils::isArrayIndexValid method. #551. 2020-06-13 10:41:31 -04:00
Edgar Asatryan 874cc14328
[LANG-1550] Optimize ArrayUtils::isArrayIndexValid method. (#551)
* [LANG-1550] Optimize ArrayUtils::isArrayIndexValid method.
2020-06-13 10:39:41 -04:00
Gary Gregory 96a8969c13 Remove trailing white space. 2020-06-12 17:36:10 -04:00
Gary Gregory b2412284a3 [LANG-1569] Add ArrayUtils.get(T[], index, T) to provide an
out-of-bounds default value
2020-06-12 16:41:10 -04:00
Gary Gregory 5b699d0765 [LANG-1569] Add ArrayUtils.get(T[], index, T) to provide an
out-of-bounds default value
2020-06-12 16:40:49 -04:00
Gary Gregory 495167a392 Sort members. 2020-06-12 16:25:35 -04:00
Gary Gregory 40cb020e8d Sort members. 2020-06-12 16:20:28 -04:00
Gary Gregory 6094cf2237 Remove trailing white space. 2020-06-12 16:15:01 -04:00
Gary Gregory 67929942a5 - Update com.github.spotbugs:spotbugs 4.0.3 -> 4.0.4.
- Update com.puppycrawl.tools:checkstyle  8.32 -> 8.33.
2020-06-12 15:35:28 -04:00
Gary Gregory f5e9f55283 [LANG-1568] Add more failable Consumers to match JRE stock Consumers. 2020-06-12 15:25:14 -04:00
Gary Gregory 540ec09e25 Sort members. 2020-06-12 11:36:13 -04:00
Gary Gregory d88f70e8ff [LANG-1568] FailableBooleanSupplier, FailableIntSupplier,
FailableLongSupplier, FailableDoubleSupplier.
2020-06-12 11:35:37 -04:00
Gary Gregory 42a73e1499 Add missing Javadoc. 2020-06-12 09:01:16 -04:00
Gary Gregory 8f7eb6ce20 Simplify lambads.
Fix Javadoc.
2020-06-11 09:55:02 -04:00
Gary Gregory e968ad5a3f Add missing @since 3.9 and 3.10 Javadoc tags.
Clean up formatting.
Clean up Javadocs.
Sort methods in AB order.
2020-06-11 09:43:11 -04:00
Gary Gregory 598e8bd51e Javadoc. 2020-06-10 09:07:59 -04:00
John Patrick 115a6c64bc StreamsTest junit-jupiter 2020-06-01 23:43:02 +12:00
Jochen Wiedmann 3d4ed4a8ac Fixing Checkstyle warnings.
Closes #532.
2020-05-31 22:18:02 +02:00
Jochen Wiedmann c141bc961c Adding the Locks class. 2020-05-28 22:52:46 +02:00
Gary Gregory 71ee021ca5 [LANG-1545] CharSequenceUtils.regionMatches is wrong dealing with
Georgian.
2020-05-25 09:48:20 -04:00
XenoAmess 2c7e5e4b29
[LANG-1545] CharSequenceUtils.regionMatches is wrong dealing with Georgian. (#529)
* CharSequenceUtils.regionMatches is wrong dealing with Georgian.
see details in tests.
* refine tests
2020-05-25 09:41:18 -04:00
Gary Gregory c0d0d4f3ea Update com.github.spotbugs:spotbugs from 4.0.2 to 4.0.3.
Update com.puppycrawl.tools:checkstyle from 8.31 to 8.32.
2020-05-24 11:19:42 -04:00
Gary Gregory 84a80552b8 Update org.junit-pioneer:junit-pioneer from 0.5.6 to 0.6.0. 2020-05-24 11:13:00 -04:00
Gary Gregory 4db2896750 The next release will be 3.11. 2020-05-24 11:07:18 -04:00
Gary Gregory daa4193fb2 Add ArrayUtils.isSameLength() to compare more array types #430. 2020-05-24 11:05:21 -04:00
Gary Gregory f692351035 - com.github.spotbugs:spotbugs 4.0.0 -> 4.0.2.
- com.puppycrawl.tools:checkstyle 8.29 -> 8.31.
2020-04-20 17:23:31 -04:00
Gary Gregory 299736554a spotbugs.plugin.version 4.0.0 -> 4.0.2. 2020-04-20 17:13:50 -04:00
Gary Gregory 7c754d9c1e (Javadoc) Fix return tag for throwableOf*() methods #518. 2020-04-20 17:10:42 -04:00
Arend v. Reinersdorff 22500d11ae
(doc) Fix throwable is returned, not index (#518) 2020-04-20 17:08:55 -04:00
Gary Gregory d8ebaf932d Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-lang.git 2020-04-20 16:58:26 -04:00
Gary Gregory 9388c5747f [LANG-1534] Replace some usages of the ternary operator with calls to
Math.max() and Math.min() #512.
2020-04-20 16:58:20 -04:00
Isira Seneviratne 44d4acc621
Simplify some usages of the ternary operator with calls to Math.max() and Math.min(). (#512) 2020-04-20 16:57:41 -04:00
Gary Gregory 271cf4c9e9 [LANG-1537] Simplify a null check in the private replaceEach() method of
StringUtils. #514.
2020-04-20 16:56:02 -04:00
Isira Seneviratne 0b899ee40b
Simplify a null check in the private replaceEach() method. (#514) 2020-04-20 16:54:33 -04:00
Gary Gregory 96caf42b31 Simplify some if statements in StringUtils. #521. 2020-04-20 16:53:29 -04:00
Isira Seneviratne 675d30d882
Simplify some if statements in StringUtils. (#521)
* Simplify if-else statements at the start of abbreviate().

* Combine if statements in abbreviateMiddle().

* Simplify the first if condition of substringBetween().

* Simplify the first if condition of stripAll().
2020-04-20 16:52:56 -04:00
Gary Gregory f13f787a66 Simplify null checks in Triple.hashCode() using Objects.hashCode().
#516.
2020-04-20 16:44:29 -04:00
Gary Gregory c25de73d21 Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-lang.git 2020-04-20 16:43:58 -04:00
Isira Seneviratne c7ab53f9e3
Simplify null checks in Triple.hashCode() using Objects.hashCode(). (#516) 2020-04-20 16:43:46 -04:00
Gary Gregory a1531bcd1e Simplify null checks in Pair.hashCode() using Objects.hashCode(). #517. 2020-04-20 10:12:21 -04:00
Isira Seneviratne d7f8dcedfa
Simplify null checks in Pair.hashCode() using Objects.hashCode(). (#517) 2020-04-20 10:10:39 -04:00
Bruno P. Kinoshita 7f45b8898b
Merge pull request #519 from Isira-Seneviratne/Correct_assertions_in_CharUtilsTest
Alter assertions in CharUtilsTest to get the class of CharUtils instead of BooleanUtils.
2020-04-20 09:40:21 +12:00
Isira Seneviratne d94d76bbec Alter assertions to get the class of CharUtils instead of BooleanUtils. 2020-04-19 21:12:57 +05:30
Gary Gregory e9225d05b2 Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-lang.git 2020-04-17 09:15:09 -04:00
Gary Gregory 6265e2ea3b Format tweaks. 2020-04-17 09:06:52 -04:00
Isira Seneviratne 9949212b92 Fix some spelling and grammar issues in the StringUtils Javadoc. 2020-04-17 12:10:18 +05:30
Gary Gregory cfe457636a - org.junit-pioneer:junit-pioneer 0.5.4 -> 0.5.6.
- org.junit.jupiter:junit-jupiter 5.6.0 -> 5.6.1.
2020-04-07 11:10:27 -04:00
Gary Gregory d8a6c6745b Missed an update for 3.9 to 3.10. 2020-04-07 09:39:29 -04:00
Gary Gregory 312a7b3bb1 Fix Javdoc for StringUtils.appendIfMissingIgnoreCase() #507. 2020-03-31 10:35:47 -04:00
Stanislav U fbcde48f8f
Fix typo in StringUtils's Java-Doc. (#507) 2020-03-31 10:34:12 -04:00
Gary Gregory 9747b14469 Standardize on American English spelling of 'behavior'. 2020-03-30 15:03:29 -04:00
Gary Gregory 36c4cc67a1 Lambdas. 2020-03-29 17:30:29 -04:00
Gary Gregory 8c1153d371 Add download page link. 2020-03-28 10:17:10 -04:00
Gary Gregory e3a7399a7d Prepare for 3.10 RC1. 2020-03-23 09:10:49 -04:00
Gary Gregory 055c20ab98 [LANG-1529] Deprecate
org.apache.commons.lang3.ArrayUtils.removeAllOccurences(*) for
org.apache.commons.lang3.ArrayUtils.removeAllOccurrences(*).

Closes #492.
2020-03-22 09:29:45 -04:00
Gary Gregory 1c42dfb057 Clean ups. 2020-03-19 10:00:46 -04:00
Gary Gregory 6240c11f22 [LANG-1527] NumberUtils.createBigDecimal has a redundant argument check. 2020-03-15 16:37:58 -04:00
Prodigysov 02732d6132
LANG-1527: Remove an redundant argument check in NumberUtils. (#504) 2020-03-15 16:34:25 -04:00
Gary Gregory 893cc1512b [LANG-1526] Add 1 and 0 in toBooleanObject(final String str) #502. 2020-03-10 16:49:06 -04:00
Dominik Schramm fde46a232d
Added 1 and 0 in toBooleanObject(final String str) (#502)
* Added 1 and 0 in toBooleanObject(String)

* Added 1 and 0 in toBooleanObject(String)

 - Documentation
 - Tests
2020-03-07 10:58:19 -05:00
Gary Gregory ba607f525b [LANG-1525] Internally use Validate.notNull(foo, ...) instead of
Validate.isTrue(foo != null, ...).
2020-03-06 11:08:22 -05:00
Gary Gregory 200d8e9745 [LANG-1523] Avoid unnecessary allocation in StringUtils.wrapIfMissing.
#496.
2020-03-04 09:13:58 -05:00
Edgar Asatryan e9d7afbe2b
[LANG-1523] Avoid unnecessary allocation in wrapIfMissing. (#496)
Now `StringUtils#wrapIfMissing(String, char)` and `StringUtils#wrapIfMissing(String, String)` does not allocate buffer when input is already wrapped.
2020-03-04 06:11:23 -08:00
Gary Gregory 94b3784fde Simpler NPE message for new method. 2020-02-22 18:33:04 -05:00
Gary Gregory 0f119ef2a6 Javadoc tweaks. 2020-02-22 09:21:57 -05:00
Gary Gregory 8e5b10a0b0 Add missing annotations. 2020-02-22 08:57:35 -05:00
Gary Gregory 0697258b6a Use lambda.
Fix formatting.
2020-02-22 08:56:50 -05:00
Gary Gregory 01175ec911 Use final. 2020-02-22 08:53:33 -05:00
Gary Gregory e182888fb7 Fix weird formatting. 2020-02-22 08:49:44 -05:00
Gary Gregory 62d5c1037f org.junit-pioneer:junit-pioneer 0.5.3 -> 0.5.4. 2020-02-22 08:39:18 -05:00
Gary Gregory b8499c108e [LANG-1518] MethodUtils.getAnnotation() with searchSupers = true does
not work if super is generic #494.
2020-02-22 08:32:02 -05:00
Michele Preti f4c2ed4995
LANG-1518 - fix searchSupers for generic classes (#494)
* fix searchSupers for generic classes

* fix checkstyle
2020-02-22 08:28:33 -05:00
Gary Gregory eb8d069089 Reuse own code in Functions.java #493. 2020-02-19 01:00:08 -05:00
Peter Verhas 179e8f4775
try to cleanup merging (#493) 2020-02-19 00:58:33 -05:00
Gary Gregory a3edc1b6a6 [LANG-1433] MethodUtils will throw a NPE if invokeMethod() is called for
a var-args method #407.
2020-02-17 10:32:12 -05:00
Christian Franzen 553a0474ea
LANG-1433: MethodUtils will throw a NPE if invokeMethod() is called for a var-args method (#407)
* LANG-1433: MethodUtils will throw a NPE if invokeMethod() is called for a var-args method with null parameter value

* LANG-1433: Result of invokeMethod() is not deterministic for overloaded methods that can not be uniquly resolved from parameter types

* LANG-1433: Fixed checkstyle errors
2020-02-17 10:29:34 -05:00
Gary Gregory d3112e4306 ExceptionUtilsTest to 100% #486. 2020-02-17 10:19:17 -05:00
Peter Verhas 473c050cc9
Exceptionutilstest to 100p (#486)
* unit tests were added to top up the test coverage of ExceptionUtils to 100%

* unit tests were added to top up the test coverage of ExceptionUtils to 100%

* unit tests were added to top up the test coverage of ExceptionUtils to 100%

* unit tests were added to top up the test coverage of ExceptionUtils to 100%

* unit tests were added to top up the test coverage of ExceptionUtils to 100%
2020-02-17 10:13:27 -05:00
Gary Gregory f46f4e35c3 Don't prefix parameter names with 'p'. 2020-02-17 10:10:40 -05:00
Gary Gregory 7b62c8f6c9 Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-lang.git 2020-02-17 10:00:08 -05:00
Gary Gregory 2cceff590d Use Javadoc {@code} instead of pre tags. #490. 2020-02-17 10:00:02 -05:00
Peter Verhas 80839be457
JavaDoc was modified adding {@code around pre formatted text so there is no need for HTML escape sequences (#490) 2020-02-17 09:58:19 -05:00
Gary Gregory f20df21249 De-clutter root folder by moving Checkstyle configuration files into
src.
2020-02-17 09:23:27 -05:00
Gary Gregory 84197ae4e7 Don't use 'p' as a parameter name prefix (we don't do that anywhere
else.)

Add missing Javadoc.
2020-02-14 18:52:57 -05:00
Gary Gregory 53f223d3e3 Remove redundant type arguments.
Use final.
2020-02-14 18:51:24 -05:00
Jochen Wiedmann ee87df8472 Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-lang 2020-02-14 22:32:54 +01:00
U-EUR\jwi 83dd32b901 Adding Streams.toArray 2020-02-14 22:25:06 +01:00
Gary Gregory b19b2d37da Checkstyle: Remove trailing white spaces on all lines. 2020-02-14 11:43:40 -05:00
Gary Gregory d54c8951d6 Javadoc style. 2020-02-14 10:00:33 -05:00
Gary Gregory 05588e4ebb - Javadoc.
- Don't use 'p' as a parameter name prefix (we don't do that anywhere
else.)
2020-02-14 09:50:53 -05:00
Gary Gregory 0568456103 Remove redundant type arguments and end-of-line whitespace. 2020-02-14 09:39:49 -05:00
Gary Gregory 485876f9c2 Use final. 2020-02-14 09:36:04 -05:00
Gary Gregory 31e726e471 Javadoc. 2020-02-14 09:33:00 -05:00
Bruno P. Kinoshita 474ab7f5f1 Merge branch 'pr-485'
This closes #485
2020-02-14 09:50:26 +13:00
Bruno P. Kinoshita cb0f461237 [LANG-1514]: add changes.xml entry 2020-02-14 09:49:59 +13:00
Gary Gregory e6165e9377 - Update copyright year in NOTICE file.
- org.easymock:easymock 4.1 -> 4.2.
- org.junit-pioneer:junit-pioneer 0.4.2 -> 0.5.3.
- org.junit.jupiter:junit-jupiter 5.5.2 -> 5.6.0.
2020-02-13 10:25:56 -05:00
Jochen Wiedmann 3ce3b27dbd Fixing Checkstyle problems. 2020-02-07 21:59:23 +01:00
Jochen Wiedmann 2ea44b2ada - Added the Streams class.
- Added Functions.stream() as an accessor method.
2020-01-26 22:57:13 +01:00
Gary Gregory bfc88d23cb [LANG-1516] Fix generics in API signatures of ExceptionUtils. 2020-01-24 09:16:01 -05:00
Gary Gregory bb5244814c Reduce magic number usage. 2020-01-24 09:05:31 -05:00
contextshuffling 4b11c764e5 [LANG-1514] make test more stable by using HashSet to compare 2020-01-19 23:51:52 +08:00
Gary Gregory a606a0328b [LANG-1513] ObjectUtils: Get first non-null supplier value. 2020-01-07 23:03:39 -05:00
Gary Gregory 259ac721ce [LANG-1512] Add IS_JAVA_14 and IS_JAVA_15 to
org.apache.commons.lang3.SystemUtils.
2020-01-06 11:39:33 -05:00
Gary Gregory 365f73c455 [LANG-1509] Add ObjectToStringComparator. #483. 2020-01-01 09:32:27 -05:00
Gary Gregory 1df9bc7025
[LANG-1509] Add ObjectToStringComparator. (#483)
* [LANG-1509] Add ObjectToStringComparator.

* [LANG-1509] Add ObjectToStringComparator.

Repackage.

* [LANG-1509] Add ObjectToStringComparator.

Avoid NPE.

* [LANG-1509] Add ObjectToStringComparator.

Clean ups.

* Spotbugs: toString() can return null!
2020-01-01 09:31:22 -05:00
Gary Gregory 6f358e9e8d Shutdown thread pool in case of unexpected error. 2020-01-01 08:54:48 -05:00
Gary Gregory b475986174 Shutdown thread pool in case of unexpected error. 2020-01-01 08:49:39 -05:00
Gary Gregory 3b75763f9d Be quiet on the console. 2020-01-01 08:47:43 -05:00