2150 Commits

Author SHA1 Message Date
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
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
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
485876f9c2 Use final. 2020-02-14 09:36:04 -05:00
Bruno P. Kinoshita
474ab7f5f1 Merge branch 'pr-485'
This closes #485
2020-02-14 09:50:26 +13: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
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
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
Gary Gregory
eb54882ffa [LANG-1507] Add ComparableUtils #398.
Clean ups.
2020-01-01 08:19:07 -05:00
Gary Gregory
931101dd65 [LANG-1510] Add org.apache.commons.lang3.arch.Processor.Arch.getLabel(). 2019-12-31 22:43:43 -05:00
Gary Gregory
e15a2db167 Sort members.
Drop @author tag.
2019-12-31 22:32:31 -05:00
Gary Gregory
a14ee65d14 [LANG-1507] Add ComparableUtils #398.
Repackage. Another class is coming here soon.
2019-12-31 22:06:18 -05:00
Gary Gregory
b46d417ef6 [LANG-1508] Add org.apache.commons.lang3.SystemUtils.getUserName(). 2019-12-31 09:07:14 -05:00
Sam Kruglov
2425853701 [LANG-1431] Add ComparableUtils (#398) 2019-12-31 08:35:10 -05:00
Gary Gregory
5ac643368d [LANG-1506] Allow a StopWatch to carry an optional message. 2019-12-30 14:53:22 -05:00
Gary Gregory
a914a268ba [LANG-1505] Add StopWatch convenience APIs to format times and create a
simple instance.
2019-12-30 14:06:28 -05:00
pascalschumacher
84668a2d98 Use Collection#toArray(new T[0]) instead of a presized array as it is faster on modern JVMs. 2019-12-26 22:48:12 +01:00
Gary Gregory
670a832d4d [LANG-1503] Add factory methods to Pair classes with Map.Entry input.
#454.

Also adds tests that were not in the PR.
2019-12-21 17:28:30 -05:00
pascalschumacher
cb2ec37bd3 Replace Character constructor (deprecated on Java 9+) calls in tests with Character#valueOf. 2019-12-20 13:08:50 +01:00
Gary Gregory
1e70575586 Remove unnecessary array creation for varargs. 2019-12-18 16:43:09 -05:00
Gary Gregory
7bbbdd2477 Javadoc: Replace <code></code> HTML tags with Javadoc {@code} notation. 2019-12-10 16:27:02 -05:00
contextshuffling
1dabf262c9 sort fields in ReflectionToStringBuilder for deterministic order (#481) 2019-11-23 21:51:32 -05:00
contextshuffling
bc8a3b9d84 sort fields in HashCodeBuilder for deterministic order (#480) 2019-11-22 12:15:10 -05:00
bbeckercscc
d0b95be281 Lang 1463: StringUtils abbreviate returns String of length greater than maxWidth (#477)
* fixed LANG-1463 StringUtils abbreviate returns String of length greater than maxWidth

* fixed LANG-1463 StringUtils abbreviate returns String of length greater than maxWidth

* fixed LANG-1463 StringUtils abbreviate returns String of length greater than maxWidth

* formatting fix

* removed magic string
2019-11-04 17:56:50 -05:00
Gary Gregory
24e6468683 [LANG-1498] Add support of lambda value evaluation for defaulting
methods #416.
2019-11-04 17:53:58 -05:00
Gary Gregory
8445d3a991 [LANG-1498] Add support of lambda value evaluation for defaulting
methods #416.

A few more tests.
2019-11-01 00:09:59 -04:00
Gary Gregory
c47e5f95f6 [LANG-1498] Add support of lambda value evaluation for defaulting
methods #416.

Add org.apache.commons.lang3.ObjectUtils.defaultIfNull(T, Supplier<T>).
2019-10-31 21:16:17 -04:00
Liel Fridman
55a2a03aa3 [LANG-1177] Added indexesOf methods and simplified removeAllOccurences (#471)
* [LANG-1177] Added indexesOf methods and simplified removeAllOccurences in ArrayUtils

* [LANG-1177] Fixed style error

* [LANG-1177] Added @since tags for newly provided methods

* changing BitSet vars name to bitSet and inlining the 'foundBits'

* Fixed Javadoc in indexesOf

* Fixed trailing spaces

* Fixing a trailing space
2019-10-29 10:35:36 -04:00
vlcheong
4a934610e7 LANG-1495 Update EnumUtils.java (#475)
* Update EnumUtils.java

* LANG-1495 Add Overloading Methods To EnumUtils

LANG-1495 Add Overloading Methods To EnumUtils

* Add @since 3.10
2019-10-28 14:26:26 -04:00
apirom9
54afdb3035 Add more test inputs for ArrayUtils.toMap() method (#472)
* Add more test inputs for ArrayUtils.toMap() method in case zero-length array, all null values array, and duplicate keys in array

* Fixed style

* Fixed style

* Fixed as changed request

* Remove unused import statement
2019-10-25 09:15:08 -04:00
Gary Gregory
ac00199379 [LANG-1494] Add org.apache.commons.lang3.time.CalendarUtils. 2019-10-18 16:08:46 -04:00
Gary Gregory
9489d55d5c Drop Subversion Id keywords. 2019-10-17 17:25:34 -04:00
Peter Verhas
bedae6950d LANG-1480 getAbbreviatedName refactored to create appropriate length … (#446)
* LANG-1480 getAbbreviatedName refactored to create appropriate length short class names

* LANG-1480 code fixed for special extreme case ".." abbreviated to 1 length should result ".." it was throwing exception. Tests are added

* import changed to avoid wild cards
apache master merged into current branch

* Mutable object import was moved to it's original place

* some accidental formatting reverted

* some accidental formatting reverted

* some accidental formatting reverted

* some accidental formatting reverted

* some accidental formatting reverted

* some accidental formatting reverted

* some accidental formatting reverted

* added another test case

* LANG-1480 fixing JavaDoc documentation as per requested by garydgregory

* LANG-1480 shortcut implemented, argument renamed, more tests

* LANG-1480 checkstyle update

* LANG-1492 tests methods modified to be public

* LANG-1480 imports rearranged

* LANG-1480 imports rearranged

* LANG-1480 imports rearranged

* imports were added that were accidentally removed during merging master
2019-10-12 15:16:54 -04:00
Peter Verhas
a32c188c32 Code refactor to simplify Functions and new tests (#463)
* more tests

* formatting change as per requested by checkstyle

* DisplayName was added to the tests

* throw on odd refactored to eliminate copy paste
2019-10-12 15:12:17 -04:00
Peter Verhas
23f18044d1 Update documentation related to the issue LANG-696 (#449)
* mainly documentation and some more tests, which are used in the
documentation manually copied from unit test to javaDoc

* fixed fragile unit tests (still fragile)
LANG-696 added the warning lines as requested by Stzx

* LANG-1480 checkstyle update, space inserted

* LANG-1480 import * was removed
2019-10-08 14:53:01 -04:00
Mikko Maunu
089b43a0a6 [LANG-1426] Corrected usage examples in Javadocs (#458)
* [LANG-1426] Corrected usage examples in Javadocs

* [LANG-1426] Added @throws Javadoc, corrected verb from check to truncate and consistently mimicking exception message in assertion message
2019-09-25 10:32:10 -04:00
Gary Gregory
a1395b6823 One empty line between methods. 2019-09-13 11:40:24 -04:00
Gary Gregory
26ed080b46 Sort members. 2019-09-13 11:39:08 -04:00
Gary Gregory
3ea8244287 More lambdas, less boilerplate. 2019-09-12 20:42:35 -04:00
Gary Gregory
9a3f74709c Remove trailing white spaces on all lines. 2019-09-11 14:55:33 -04:00
Gary Gregory
59231ca9c2 [LANG-1453] StringUtils.removeIgnoreCase("İa", "a") throws
IndexOutOfBoundsException #423.
2019-09-11 14:50:15 -04:00
Gary Gregory
c3077ad1c1 Sort members. 2019-09-11 10:25:48 -04:00
Gary Gregory
651c8f5c23 Remove trailing white spaces on all lines 2019-09-11 09:29:56 -04:00