Commit Graph

5280 Commits

Author SHA1 Message Date
Gary Gregory faa48f6b6a Fix generics warning. 2020-10-25 10:21:12 -04:00
Gary Gregory 75b4058ac4 NumberUtilsTest - incorrect types in min/max tests #634.
- Document change.
- Sort methods.
- Format to max line length 120.
2020-10-25 10:18:00 -04:00
Hubert 6d7a3e6eeb
NumberUtilsTest - incorrect types in min/max tests (#634)
* Fix: correctly declared types and added castings

* Fix: code format

* Redo - optimize imports
2020-10-25 10:12:45 -04:00
Gary Gregory 110b4c021e Checkstyle. 2020-10-22 14:53:59 -04:00
Gary Gregory 7995aad79f Split out tests for a Java 15 bug.
These tests fail on Java 15 due to a bug which was only fixed for Java
16.
See https://bugs.openjdk.java.net/browse/JDK-8248434
See https://bugs.openjdk.java.net/browse/JDK-8248655
2020-10-22 14:47:45 -04:00
Gary Gregory bcdff98f02 Sort methods. 2020-10-20 11:45:46 -04:00
Gary Gregory b8204aa29b Checkstyle: Whitepace. 2020-10-20 11:05:14 -04:00
Gary Gregory d05ad7abd6 Add missing Javadoc. 2020-10-20 10:47:07 -04:00
Gary Gregory e14a2d9226 Update dependencies.
- Bump biz.aQute.bndlib from 5.1.2 to 5.2.0 #628.
- Bump spotbugs from 4.1.3 to 4.1.4 #627.
- Bump junit-pioneer from 0.9.2 to 1.0.0 #625.
2020-10-20 10:21:56 -04:00
Alex Herbert 43c80576cf LANG-1608: Track changes 2020-10-17 14:00:54 +01:00
Gary Gregory 8ff63a0da3 Bump spotbugs-maven-plugin from 4.0.4 to 4.1.3 #623. 2020-10-03 10:28:45 -04:00
Gary Gregory a6f97f358f Bump junit-pioneer from 0.9.0 to 0.9.2 #624. 2020-10-02 11:15:43 -04:00
Rob Tompkins c1c4a7535b (changes) Bump junit-jupiter from 5.6.2 to 5.7.0 2020-10-01 10:16:03 -04:00
Rob Tompkins dd1c0d9292 (changes) Bump spotbugs from 4.1.2 to 4.1.3 2020-10-01 10:10:16 -04:00
Rob Tompkins 66681a7643 (changes) Bump checkstyle from 8.36 to 8.36.2 2020-10-01 10:07:30 -04:00
Gary Gregory b2e7374bfb Add BooleanUtils.booleanValues().
Add BooleanUtils.primitiveValues().

Handy for tools and tests.
Make next release version 3.12.0.
2020-09-28 15:31:56 -04:00
Gary Gregory a3e5a0134e Sort members. 2020-09-28 15:19:12 -04:00
Gary Gregory 218eae4c3a Sort members. 2020-09-28 15:13:28 -04:00
Gary Gregory bae0e42fac Update commons.jacoco.version 0.8.5 to 0.8.6 (Fixes Java 15 builds). 2020-09-19 16:05:16 -04:00
Sebb 4b5f1cf57d One per line 2020-09-12 23:38:51 +01:00
Sebb 433700ea80 One per line 2020-09-12 23:37:12 +01:00
Sebb 693e5129e8 Useless assignment 2020-09-12 23:34:29 +01:00
Sebb 875d1054c0 Useless parentheses 2020-09-12 23:32:56 +01:00
Sebb 7ab21126a0 Docs 2020-09-12 23:31:44 +01:00
Sebb 38a9209456 LANG-1606 StringUtils.countMatches - fix Javadoc 2020-09-12 23:23:18 +01:00
Gary Gregory 0054e51500 checkstyle from 8.35 to 8.36 #614. 2020-09-08 11:47:02 -04:00
Gary Gregory 3621a65051 ContextedException Javadoc add missing semicolon #581. 2020-08-30 18:33:34 -04:00
iamchao1129 ddac01fc9a
Add semicolon (#581)
Co-authored-by: zhangchao36 <zhangchao36@jd.com>
2020-08-30 18:31:34 -04:00
Gary Gregory 81efeaacad [LANG-1600] Restore handling of collections for non-JSON ToStringStyle
#610.
2020-08-30 18:29:54 -04:00
Michael F 772f97c437
[LANG-1600] Restore handling of collections for non-JSON ToStringStyle (#610)
* [LANG-1600] add test cases for non-empty collections, maps, and arrays

* break out those test cases into separate methods for legibility
* addresses issue introduced in LANG-1542 with commit 1dddec8

* [LANG-1600] restore non-json-style handling of appendDetail() for Collection

* addresses issue introduced in LANG-1542 with commit 1dddec8
2020-08-30 18:27:17 -04:00
Gary Gregory 47f96a3c95 End sentence with a period. 2020-08-30 18:13:45 -04:00
Gary Gregory 0683ab262d Revert "Better link."
This reverts commit b1a66d2da9.
2020-08-30 18:13:18 -04:00
Gary Gregory b1a66d2da9 Better link. 2020-08-30 18:12:26 -04:00
Gary Gregory 5512896585 spotbugs from 4.1.1 to 4.1.2 #609. 2020-08-30 11:37:31 -04:00
Gary Gregory fb34130520 actions/setup-java from v1.4.0 to v1.4.2 #612. 2020-08-30 11:34:48 -04:00
Gary Gregory 21fe158cb2 Merge branch 'release' and resolve conficts. 2020-08-30 11:33:31 -04:00
Gary Gregory 2f19010c7a Fix a Javadoc link to always point to the current release and not
mention a specific version label.
2020-08-30 11:27:37 -04:00
Gary Gregory 31dc5c700e Remove old comments. 2020-08-20 13:50:23 -04:00
Gary Gregory 5d05df0f9e Simplify lambdas. 2020-08-14 23:35:42 -04:00
Gary Gregory 348cf47741 [LANG-1596] ArrayUtils.toPrimitive(Object) does not support boolean and
other types #607.
2020-08-14 23:27:31 -04:00
Richard Eckart de Castilho 6996806101
[LANG-1596] ArrayUtils.toPrimitive(Object) does not support boolean and other types (#607)
- Add support for the missing types to toPrimitive(Object)
- Added tests for toPrimitive methods which did not have test coverage yet
- Added explicit test for the toPrimitive(Object) method for all primitive types
2020-08-14 23:25:54 -04:00
Gary Gregory 9f52471fab junit-pioneer from 0.8.0 to 0.9.0 #600. 2020-08-10 12:03:02 -04:00
Gary Gregory 17e1f408f7 actions/checkout from v2.3.1 to v2.3.2 #601. 2020-08-10 12:02:06 -04:00
Gary Gregory 8a877ec12e Describe recent change. 2020-08-03 09:29:10 -04:00
Gary Gregory 528e4c7655 Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-lang.git 2020-08-03 09:20:46 -04:00
Gilles Sadowski 4897c8869b LANG-1593: Add unit test with OP's use-case that shows unexpected difference in behaviour.
Unit test is set to "@Disabled" to not fail the build.
2020-08-03 12:24:13 +02:00
Gary Gregory 03ae165039 Document recent changes. 2020-07-31 09:13:40 -04:00
aherbert c3b4e22562 Fix changes description to include class name 2020-07-29 11:50:55 +01:00
aherbert dbe022e646 LANG-1579: Improve stripAccents conversion of remaining accents
Single characters can be changed in place to avoid delete then insert.

Closes #568
2020-07-29 11:47:46 +01:00
Gary Gregory f22f659321 Document recent change. 2020-07-23 11:14:40 -04:00
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