Commit Graph

5723 Commits

Author SHA1 Message Date
Gary Gregory f9535b52a5 [LANG-1507] Add ComparableUtils #398. 2019-12-31 08:41:07 -05:00
Sam Kruglov 2425853701 [LANG-1431] Add ComparableUtils (#398) 2019-12-31 08:35:10 -05:00
Gary Gregory 2a3c56efc0 Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-lang.git 2019-12-30 16:26:21 -05:00
Gary Gregory e4e7de4df9 Checkstyle: Remove trailing white spaces on all lines. 2019-12-30 16:26:12 -05:00
pascalschumacher b2a0ac79b6 ArrayUtils: Remove stray comment. 2019-12-30 22:16:26 +01:00
pascalschumacher 94b0752726 ArrayUtils: Fix checkstyle violation. 2019-12-30 22:14:08 +01: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
Gary Gregory de7b773087 Sort members. 2019-12-30 13:46:05 -05:00
Gary Gregory c8289bfcc9 Javadoc. 2019-12-30 13:41:54 -05:00
Gary Gregory 0ef55fe145 Don't generate gratuitous garbage. 2019-12-26 19:26:14 -05:00
pascalschumacher d5948be13f Use ArrayUtils#EMPTY_STRING_ARRAY instead of creating new empty String arrays. 2019-12-26 23:51:46 +01: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
pascalschumacher fe44a99852 CompareToBuilder: Fix checkstyle violation. 2019-12-26 10:25:50 +01:00
Gary Gregory 3744263970 Use Objects.requireNonNull() instead of custom check. Minor formatting. 2019-12-25 23:00:43 -05:00
pascalschumacher ff05749cdc Conversion#binaryToHexDigit(boolean[], int): Simplify implementation by removing redundant conditions. 2019-12-22 12:42:16 +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
Gary Gregory e910e9c908 Functions Javadoc #466. 2019-12-21 08:43:24 -05:00
Peter Verhas 23931d528e Functions Javadoc (#466)
* 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

* javadoc was added that explains why there is a return type for a method that never returns

* wording changed in comment

* fixes based on code review by garydgregory
2019-12-21 08:42:53 -05:00
Gary Gregory cb674720a9 BooleanUtils Javadoc #469. 2019-12-21 08:40:27 -05:00
Peter Verhas 936dd601b7 BooleanUtils Javadoc (#469)
* 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

* some simplification that were there since before Java 1.4

* mainly unneccessary unboxing

* documentation partly reverted

* javadoc changes only

* ArrayUtils change reverted
2019-12-21 08:39:19 -05:00
Gary Gregory 742eb8982b Update POM parent: org.apache.commons:commons-parent 48 -> 50.
tar
2019-12-21 07:57:41 -05:00
Gary Gregory b4645f695b Update build dependency: com.puppycrawl.tools:checkstyle 8.26 -> 8.27. 2019-12-20 23:11:33 -05:00
Gary Gregory 74c8862d0c Update test dependency: org.junit-pioneer:junit-pioneer 0.3.3 -> 0.4.2. 2019-12-20 23:03:22 -05:00
pascalschumacher c9ca06e496 Remove no longer necessary SpotBugs excludes. 2019-12-20 13:28:20 +01:00
pascalschumacher cb2ec37bd3 Replace Character constructor (deprecated on Java 9+) calls in tests with Character#valueOf. 2019-12-20 13:08:50 +01:00
pascalschumacher 325d9a97d6 EventListenerSupport: Fix string format of Validate#isTrue call in constructor. 2019-12-20 12:45:22 +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
Gary Gregory 404d67841e [LANG-1501] Sort fields in ReflectionToStringBuilder for deterministic
order #481.
2019-11-23 21:52:34 -05:00
contextshuffling 1dabf262c9 sort fields in ReflectionToStringBuilder for deterministic order (#481) 2019-11-23 21:51:32 -05:00
Gary Gregory 182b2506b3 Update build dependency: com.puppycrawl.tools:checkstyle 8.25 -> 8.26. 2019-11-22 12:25:09 -05:00
Gary Gregory 98e122b689 Update test dependencies.
- org.easymock:easymock 4.0.2 -> 4.1
- org.hamcrest:hamcrest 2.1 -> 2.2
- org.junit-pioneer:junit-pioneer 0.3.0 -> 0.3.3
2019-11-22 12:23:09 -05:00
Gary Gregory f25b44b25f [LANG-1500] Test may fail due to a different order of fields returned by
reflection api #480.
2019-11-22 12:18:04 -05:00
contextshuffling bc8a3b9d84 sort fields in HashCodeBuilder for deterministic order (#480) 2019-11-22 12:15:10 -05:00
Gary Gregory 1163e17713 LANG-1463] StringUtils abbreviate returns String of length greater than
maxWidth #477.
2019-11-04 18:01:42 -05:00
Gary Gregory 49e9754b6c In-line local variables only used once. 2019-11-04 17:59:38 -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 16cc98fbfa Fix Java 11 Javadoc. 2019-11-03 18:53:42 -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 a4c60c4e01 [LANG-1498] Add support of lambda value evaluation for defaulting
methods #416.

Better param name.
2019-11-01 00:04:02 -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
Gary Gregory 89d2edbf17 Sort members. 2019-10-29 10:38:34 -04:00
Gary Gregory aaabb3eff8 [LANG-1177] Added indexesOf methods and simplified removeAllOccurences
#471.
2019-10-29 10:37:23 -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
Gary Gregory 619a7024c4 Sort methods. 2019-10-28 14:30:14 -04:00
Gary Gregory be1536fe56 Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-lang.git 2019-10-28 14:29:00 -04:00
Gary Gregory b26198d2e9 [LANG-1495] Add EnumUtils getEnum() methods with default values #475. 2019-10-28 14:28:50 -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