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
Gary Gregory
43d225464e
Faster StopWatchTest.testSuspend()
...
- Replace Matcher calls with sane assertTrue()
- Use variable names in assertion messages to match the source
2024-09-04 12:37:08 -04:00
Gary Gregory
edddaeb054
Faster StopWatchTest
2024-09-04 11:59:00 -04:00
Gary Gregory
ba4c2cf737
Faster StopWatchTest.testSimple()
...
and simpler
2024-09-04 11:45:29 -04:00
Gary Gregory
66d19b140e
Faster StopWatchTest.testSimple()
...
and simpler
2024-09-04 11:44:41 -04:00
Gary Gregory
b23c2d3836
Faster StopWatchTest
...
- testFormatSplitTime()
- testFormatSplitTimeWithMessage()
2024-09-04 11:35:56 -04:00
Gary Gregory
b657ed8389
Remove unused constant
2024-09-04 11:34:58 -04:00
Gary Gregory
9ba733b3a4
Comment
2024-09-04 11:34:24 -04:00
Gary Gregory
a905cc5343
Faster StopWatchTest.testStopTimeSimple()
...
- Replace Matcher calls with sane assertTrue()
2024-09-04 11:33:58 -04:00
Gary Gregory
b4e4c40af1
Faster StopWatchTest.testStopInstantSimple()
...
- Replace Matcher calls with sane assertTrue()
2024-09-04 11:32:53 -04:00
Gary Gregory
695986b2b9
Faster StopWatchTest.testLang315()
2024-09-04 11:28:14 -04:00
Gary Gregory
6dd2addd4b
Faster StopWatchTest
...
- These string formatting tests do not need to wait 500 millis each
- Refactor magic number into a constant
2024-09-04 11:24:57 -04:00
Gary Gregory
386c17ff61
Faster StopWatchTest.testToSplitString()
...
This test does not need to wait 500 millis
2024-09-04 11:21:10 -04:00
Gary Gregory
4f04d06a6b
Faster StopWatchTest.testGetTime()
2024-09-04 11:19:29 -04:00
Gary Gregory
9903591670
Format long constant for readability
2024-09-04 11:04:04 -04:00
Gary Gregory
45f2ceaf3c
Refactor constant
2024-09-04 11:00:48 -04:00
Gary Gregory
95d15cdebd
No need for formatter comments here
2024-09-04 10:59:31 -04:00
Gary Gregory
21f0069882
StopWatchTest.testGetDuration() now runs in 2 milliseconds instead of
...
550.
2024-09-04 10:58:20 -04:00
Gary Gregory
586358fb0e
Javadoc
2024-09-04 10:05:19 -04:00
Gary Gregory
6d29fd4d14
Sentence starts with a capital
2024-09-04 10:01:04 -04:00
Gary Gregory
a9bb7e90fa
Use Assertions.assertInstanceOf()
2024-09-01 19:02:47 -04:00
dependabot[bot]
9cac8b5b98
Bump github/codeql-action from 3.26.4 to 3.26.6 ( #1268 )
...
Bumps [github/codeql-action](https://github.com/github/codeql-action ) from 3.26.4 to 3.26.6.
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](f0f3afee80...4dd16135b6
)
---
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-08-30 12:32:39 -04:00
Gary Gregory
ba51fe3a03
Pick up exec-maven-plugin version from parent POM
2024-08-30 08:47:19 -04:00
Gary Gregory
97a96ba08b
Fix action types in changes.xml
2024-08-30 08:42:14 -04:00
Gary Gregory
3769c18aaa
Fix flaky FileUtilsWaitForTest.testWaitForNegativeDuration()
2024-08-30 08:41:43 -04:00
Gary Gregory
1091e835de
Bump org.apache.commons:commons-parent from 73 to 74 #1267
2024-08-29 15:52:49 -04:00
dependabot[bot]
404a75316b
Bump org.apache.commons:commons-parent from 73 to 74 ( #1267 )
...
Bumps [org.apache.commons:commons-parent](https://github.com/apache/commons-parent ) from 73 to 74.
- [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-08-29 15:51:58 -04:00