SujathaH
4a262f5e71
Replace MD5 digest with SHA256 while logging payload in Mock class called from tests ( #8319 )
2023-08-11 17:59:26 +02:00
Basil Crow
8240e0736c
Remove usages of org.apache.commons.io.output.NullOutputStream ( #8144 )
2023-06-16 08:44:01 +01:00
Basil Crow
d3417ebec9
Forward compatibility for Commons IO 2.13.0 in hudson.Util#loadFile ( #8142 )
2023-06-15 09:57:18 +02:00
Benoit Lacelle
c48728d0f4
Use String#isEmpty where possible ( #7690 )
2023-04-08 08:04:47 -07:00
Daniel Beck and Daniel Beck
b7ca1a87ee
Document at-since for Util#fullEncode ( #7086 )
...
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com >
2022-09-12 08:19:08 +01:00
Basil Crow
6b0dc184bf
[JENKINS-67624] FileAlreadyExistsException on startup ( #7027 )
2022-08-24 10:45:13 -07:00
Basil Crow
76e5c98dd3
Use try-with-resources where possible ( #6765 )
2022-07-04 17:36:33 -07:00
Alex
680aab31fd
Fill in @since TODO annotations ( #6396 )
2022-03-24 23:22:19 -07:00
Stefan Spieker and Daniel Beck
eecfbf2a33
Deprecate Util.copyFile() ( #6272 )
...
* deprecate copyFile
* Update core/src/main/java/hudson/Util.java
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com >
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com >
2022-02-13 20:59:27 +01:00
Basil Crow
e27b310065
Enable whitespace-related Checkstyle checks ( #6149 )
2022-01-03 08:55:03 -08:00
Basil Crow
86dec5a136
Fill in some deprecation TODOs ( #6148 )
2022-01-01 07:54:19 -08:00
Basil Crow
27646d11e4
[JENKINS-67372] Restore support for symbolic links in the Jenkins home directory ( #6059 )
2021-12-18 11:17:05 -08:00
Basil Crow
337a6f18a5
Reduce usages of Ant ( #6041 )
2021-12-11 12:48:18 -08:00
Basil Crow and James Nord
2ea1148286
Fix CatchingUnchecked Error Prone violations ( #5950 )
...
Co-authored-by: James Nord <jtnord@users.noreply.github.com >
2021-12-10 09:51:30 -08:00
Basil Crow
f29b478983
Fix UnnecessarilyFullyQualified Error Prone violations ( #5737 )
2021-09-20 09:45:37 +01:00
Basil Crow
632033d6ad
Sort imports ( #5732 )
2021-09-18 09:39:42 +01:00
Basil Crow
f12f400a5c
Consistently use issues.jenkins.io for issue links ( #5724 )
2021-09-13 20:07:44 +01:00
Brady Shober and Wadeck Follonier
471f7c38c8
Encode special characters for generated shell command ( #5636 )
...
Co-authored-by: Wadeck Follonier <Wadeck@users.noreply.github.com >
2021-08-24 07:59:54 +01:00
Basil Crow
0913566aef
Remove native chmod(2) and stat(2) support ( #5606 )
2021-07-23 00:05:06 +08:00
Basil Crow
bd7c823c27
Remove unnecessary parentheses ( #5576 )
2021-06-25 09:23:37 +01:00
Daniel Beck
952d02d596
Change old issue references from #... to JENKINS-...
2021-05-15 08:48:27 +02:00
Basil Crow
c904989067
Deprecate Util#join(Collection, String) in favor of String#join(CharSequence, Iterable) ( #5467 )
2021-05-09 08:08:59 +01:00
Basil Crow
95e85495ca
Enable AvoidStarImport Checkstyle check ( #5420 )
2021-04-28 17:28:39 +08:00
Jesse Glick
f6098a1df4
Fixing deprecation link in Util.isAbsoluteUri
2021-04-05 18:05:39 -04:00
StefanSpieker
58499905f8
replaced MS_SHOULD_BE_FINAL general spotbugs exclude with individual excludes ( #5235 )
2021-03-08 07:58:49 +00:00
Daniel Beck and Daniel Beck
9b8e3ca937
Update RestrictedSince annotations with version numbers ( #5277 )
...
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com >
2021-02-23 08:13:46 +00:00
Daniel Beck and Daniel Beck
90f2d5e3dd
Add at-since annotations up to 2.279 ( #5276 )
...
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com >
2021-02-23 08:13:23 +00:00
Vincent Latombe
4ff3f04436
[JENKINS-63828] It is legal to have a CloudProvisioningListener not implementing canProvision
...
I got confused in
https://github.com/jenkinsci/jenkins/commit/3992a30efb1abf697cae8e02f9e81dd04b92b135
by Cloud#canProvision which was abstract vs.
CloudProvisioningListener#canProvision which wasn't and was returning
null.
2020-10-07 14:44:15 +02:00
Vincent Latombe and Jesse Glick
3992a30efb
Add CloudState to be passed to Cloud#provision and Cloud#canProvision methods. ( #4922 )
...
Co-authored-by: Jesse Glick <jglick@cloudbees.com >
2020-09-25 21:34:05 +01:00
Tim Van Holder
7c2abcfa94
[JENKINS-62723] Extend JavaDoc with @throws
2020-07-08 00:09:21 +02:00
Tim Van Holder
9c088c27f2
[JENKINS-62723] Further fix for Util.isOverridden
...
This handles the remaining case (override provided by default implementation of an interface).
2020-07-07 22:23:40 +02:00
Tim Van Holder
ccc0e34724
[JENKINS-62723] Improve Util.isOverridden
...
It will now deal with final/abstract methods appropriately.
It will also clearly report bad arguments (base not base of derived, or base does not declare the method).
Added a unit test for interface cases.
Small gap to be looked into: overrides provided via default implementation of a (derived) interface.
2020-07-07 22:09:59 +02:00
Daniel Beck and Daniel Beck
a53ef93cca
Use the 'agent' term more often ( #4777 )
...
* Use the 'agent' term more often
* More cleanup
* Another occurrence
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com >
2020-06-09 18:00:37 +02:00
James Nord
bdcb2fb222
Merge remote-tracking branch 'origin/master' into kill-jsr-305
2020-03-30 12:40:44 +01:00
Tim Jacomb
6572cfe4b4
Merge pull request #3941 from jsoref/JENKINS-56643
...
[JENKINS-56643] Util.createSymlink: prefer Files.move(..., ATOMIC_MOVE)
2020-03-28 09:08:04 +00:00
James Nord
1f946961b9
s/javax.annotation.CheckForNull/edu.umd.cs.findbugs.annotations.CheckForNull/g
2020-03-26 16:12:35 +00:00
James Nord
819f80b12f
s/javax.annotation.Nonnull/edu.umd.cs.findbugs.annotations.NonNull/g
2020-03-26 11:14:41 +00:00
James Nord
a7fcc8e447
s/javax.annotation.Nullable/edu.umd.cs.findbugs.annotations.Nullable/g
2020-03-26 11:11:22 +00:00
Jeff Thompson
bf9ee2ecf4
Address review comments.
2020-01-23 14:59:51 -07:00
Jeff Thompson
348a26f77e
Narrow the suppression.
...
And add TODO connected with JENKINS tickets for relevant issues.
2020-01-23 14:59:51 -07:00
Jeff Thompson
c76ee59810
Add findsecbugs plugin to spotbugs.
...
And suppress existing warnings. We should clean some of them up, but that's for different PRs.
2020-01-23 14:53:53 -07:00
Stefan Spieker
2fbc94bb87
set spotbugs ICAST_IDIV_CAST_TO_DOUBLE to ignore, because precision loss is intended
2019-12-31 10:50:09 +01:00
James Nord
7228af5bb1
[JENKINS-60351] - Make it possible to disable multiple deletion attempts by setting hudson.Util.maxFileDeletionRetries to zero ( #4382 )
...
* [JENKINS-60351] It should be possible to disable a retry of the
PathRemover
This does not address the issues that the comments and code in
hudons.Util are inconsistent if they are for retries or total number of
attempts (they are currently total number of attempts)
* [JENKINS-60351] Make the code conform to the documentation
maxRetries should control the number of retries not the number of
attempts.
* rename field from DELETION_MAX to DELETION_RETRIES
2019-12-20 11:07:33 +01:00
Basil Crow
861855953b
Replace <code>…</code> with {@code …}
2019-10-19 14:02:59 -07:00
Raihaan Shouhell
e5166f7f8d
Foreach loops
2019-10-01 13:49:43 +08:00
jesse-houghton
d763b4cb11
Added missing null check and associated test ( #4204 )
2019-09-20 09:36:18 +02:00
Jesse Glick
ebd12e727e
Deprecating useless Util.getPastTimeString.
2019-08-26 14:15:20 -04:00
Alex Earl
f982d84a07
Fix JENKINS-23349 ( #4152 )
...
This fixes the issue when the project name
includes a character that can't be encoded
directly in UTF-8, e.g., surrogate pairs.
2019-08-17 13:10:56 +02:00
Josh Soref
4213391a57
[JENKINS-56643] Util.createSymlink: prefer Files.move(..., StandardCopyOption.ATOMIC_MOVE)
...
Atomic moves mean that there is no time point during which the symlink
will not exist.
Otherwise, if there is a user trying to access the symlink and there is
a process trying to update the symlink, there will be a window during
which there is no symlink. When that happens, builds can randomly fail.
Implementation:
Introduce a private createSymlinkAtomic which will atomically create a
symlink in the right place and return true, or return false leaving no
changes to the file system. It does not throw exceptions.
When it fails, the previous code is used instead.
Changes to the existing code are designed to slightly clarify what
objects are and reuse objects instead of creating them multiple times.
2019-03-20 16:26:03 -04:00
Josh Soref
003e525b79
Java can infer types for <>
2019-02-21 00:33:38 -05:00