Commit Graph

8159 Commits

Author SHA1 Message Date
Gary Gregory ba4281f15b Make XML a little more readable 2024-09-22 08:27:13 -04:00
Gary Gregory 4768e909e3 Javadoc 2024-09-22 08:21:17 -04:00
Gary Gregory ccaae51292 [LANG-1747] Add StopWatch.run([Failable]Runnable) and
get([Failable]Supplier)
2024-09-22 08:15:04 -04:00
Gary Gregory c4049be5f7 Remove trailing whitespace in StopWatch exception messages 2024-09-22 08:12:54 -04:00
Gary Gregory da246244ae Add StopWatch.run([Failable]Runnable) and get([Failable]Supplier) 2024-09-22 08:11:40 -04:00
Gary Gregory 31c7c5bde1 Javadoc
Proper instance initialization
2024-09-21 21:49:19 -04:00
Gary Gregory b424803abd Rewrite ClassUtils.getClass() without recursion to avoid
StackOverflowError on very long inputs.

- This was found fuzz testing Apache Commons Text which relies on
ClassUtils.
- OssFuzz Issue 42522972:
apache-commons-text:StringSubstitutorInterpolatorFuzzer: Security
exception in org.apache.commons.lang3.ClassUtils.getClass
2024-09-21 17:23:08 -04:00
Gary Gregory 2d9eddb798 Next version will be 3.18.0 2024-09-21 17:11:42 -04:00
Gary Gregory 6941f81cd3 Add Strings and refactor StringUtils 2024-09-21 10:35:43 -04:00
Gary Gregory 8e9bdc5292
Bump org.apache.commons:commons-parent from 74 to 75 #1277 2024-09-20 21:16:14 -04:00
dependabot[bot] 728a380602
Bump org.apache.commons:commons-parent from 74 to 75 (#1277)
Bumps [org.apache.commons:commons-parent](https://github.com/apache/commons-parent) from 74 to 75.
- [Changelog](https://github.com/apache/commons-parent/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-parent/commits)

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-parent
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-20 21:15:30 -04:00
Gary Gregory 310d9c9be9 Add test 2024-09-20 20:28:20 -04:00
Gary Gregory 554eb26c78 Git ignore jenv's version file 2024-09-20 20:20:42 -04:00
Gary Gregory 3dd79d4f79 Add dependency-review.yml to GitHub CI 2024-09-20 20:04:13 -04:00
dependabot[bot] 0f24110b90
Bump github/codeql-action from 3.26.7 to 3.26.8 (#1276)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.7 to 3.26.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](8214744c54...294a9d9291)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-20 13:01:19 -04:00
Gary Gregory b23dae530f CI builds: Replace Java 22 with Java 23 2024-09-18 20:35:12 -04:00
Gary Gregory c2cd0525d9 Javadoc 2024-09-15 15:50:34 -04:00
Gary Gregory 4b621c8c03 Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-lang.git 2024-09-15 15:45:29 -04:00
Gary Gregory 425a0c3eae Javadoc and comment 2024-09-15 15:45:19 -04:00
dependabot[bot] 9cf1916c2c
Bump github/codeql-action from 3.26.6 to 3.26.7 (#1275)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.6 to 3.26.7.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](4dd16135b6...8214744c54)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-13 12:15:57 -04:00
dependabot[bot] fc11a57502
Bump actions/setup-java from 4.2.2 to 4.3.0 (#1274)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 4.2.2 to 4.3.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](6a0805fcef...2dfa2011c5)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-13 12:15:45 -04:00
Gary Gregory fae5ca31a0 Remove redundant syntax 2024-09-12 10:21:28 -04:00
Gary Gregory ae1d3c5c4c Remove redundant syntax 2024-09-12 10:20:52 -04:00
Gary Gregory 91fde94b49 Remove redundant syntax 2024-09-12 10:20:33 -04:00
Gary Gregory 082b2d8b8c Remove redundant syntax 2024-09-12 10:20:09 -04:00
Gary Gregory 295e91a27a Remove redundant syntax 2024-09-12 10:18:50 -04:00
Gary Gregory 55a9cb915a Remove redundant syntax 2024-09-12 10:17:52 -04:00
Gary Gregory a2fe02fc0c Remove redundant syntax 2024-09-12 10:17:40 -04:00
Gary Gregory a9f02bc64e Remove redundant syntax 2024-09-12 10:17:32 -04:00
Gary Gregory 7cad9c3ef8 Remove redundant syntax 2024-09-12 10:17:23 -04:00
Gary Gregory b7698a627f Remove redundant syntax 2024-09-12 10:17:16 -04:00
Gary Gregory ce90d81ac2 Remove redundant syntax 2024-09-12 10:17:02 -04:00
Gary Gregory 3739a4cd37 Merge if clauses 2024-09-12 10:16:48 -04:00
Gary Gregory 2e0e2a1659 Use final 2024-09-12 10:15:26 -04:00
Gary Gregory 200f02bec1 Remove redundant syntax 2024-09-12 10:15:17 -04:00
Gary Gregory 6c14b377e5 Use final 2024-09-12 10:15:08 -04:00
Gary Gregory 4654e093bf Remove redundant syntax 2024-09-12 10:14:58 -04:00
Gary Gregory 2f8cc86f3a Use final 2024-09-12 10:14:47 -04:00
Gary Gregory 24e80503b3 Remove redundant syntax 2024-09-12 10:14:36 -04:00
Gary Gregory a2706e7c96 Remove redundant syntax 2024-09-12 10:14:26 -04:00
Gary Gregory e3552a530d Remove redundant call to super()
Use final
Remove redundant syntax
2024-09-12 10:14:00 -04:00
Gary Gregory beb3b8fbc5 Use final
Remove redundant syntax and whitespace
2024-09-12 10:13:16 -04:00
Gary Gregory ebfd8e5566 Use final 2024-09-12 10:12:34 -04:00
Gary Gregory a216a36dc1 Use final 2024-09-12 10:12:26 -04:00
Gary Gregory ec4f545b69 Refactor into constants 2024-09-11 09:36:17 -04:00
Gary Gregory 61580f2c01
Fix handling of non-ASCII letters & numbers in RandomStringUtils #1273 2024-09-10 20:49:42 -04:00
Fabrice Benhamouda fd866a9c2d
Fix handling of non-ASCII letters & numbers in RandomStringUtils (#1273)
An optimization introduced in commit
f382d61a03
incorrectly assumed that letters and numbers/digits are ASCII.

For example, `RandomStringUtils.random(1, 0x4e00, 0x4e01, true, false)`
would take too long to terminate and would not output the correct
answer, that is the string with a single character `0x4e00`.
The issue is that `end` would be replaced by `'z' + 1 = 123` (the latest
ASCII letter + 1) there: f382d61a03/src/main/java/org/apache/commons/lang3/RandomStringUtils.java (L266-L270)
 Thus, we would have `end < start` and `gap = end - start < 0`.

This PR fixes this issue by restricting the optimization to cases
where only ASCII characters are requested, that is `end < 0x7f`.
This PR also slightly clarifies the code, using constant variables
instead of '0', '9', 'A', and 'z'.

The PR also includes two regression tests.

Co-authored-by: Fabrice Benhamouda <yfabrice@amazon.com>
2024-09-10 20:47:24 -04:00
dependabot[bot] d1bf9bfe74
Bump actions/upload-artifact from 4.3.6 to 4.4.0 (#1272)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.6 to 4.4.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](834a144ee9...50769540e7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-06 09:08:35 -07:00
Gary Gregory 03aba1634d Speed up and sanitize StopWatchTest 2024-09-04 13:36:36 -04:00
Gary Gregory d0fd31f505 Be lenient for slow running builds 2024-09-04 13:16:00 -04:00