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
Josh Soref
11f301b5ee
StringBuilder.append() supports slicing
2019-02-21 00:23:53 -05:00
Josh Soref
264980c707
Java 7: omit explit type in favor of <>
2019-02-20 21:51:03 -05:00
Josh Soref
22b2720036
Java 5: foreach
2019-02-20 21:35:37 -05:00
Josh Soref
893e5c0891
Remove unused imports
2019-02-20 20:55:26 -05:00
Josh Soref
7f85e0d372
Rely on auto unboxing
2019-02-19 23:26:54 -05:00
Oleg Nenashev
a026f89ecf
Merge pull request #3456 from jennbriden/master
...
Replacing text references of "slave" with "agent"
2019-01-29 09:53:40 +01:00
Jeff Thompson
bf3f0fbf7e
Merge pull request #3841 from jvz/util-delete-regression
...
[JENKINS-55448] Util delete regression
2019-01-18 16:24:19 +00:00
Matt Sicker
94765e1a6f
Merge commit '183ca1f95ebc44318194ff53887b876e47d92d34' into security-master
2019-01-15 10:25:50 -06:00
Baptiste Mathus
7796b32023
Revert "[JENKINS-55016] Fix flakiness in UtilTest"
2019-01-14 16:42:08 +01:00
Wadeck Follonier
3210ff5774
Merge commit '6d2eb679a6fccc53d32708cc23c5927201953248' into security-master
2019-01-14 14:08:51 +01:00
Matt Sicker
a489cc4ee7
Move Windows util code into test sources
...
Signed-off-by: Matt Sicker <boards@gmail.com >
2019-01-11 15:35:02 -06:00
Matt Sicker
b747845f16
Fix Windows command line argument quoting in createJunction
...
Signed-off-by: Matt Sicker <boards@gmail.com >
2019-01-11 15:05:50 -06:00
Francisco Fernández and jvz
db59263a15
Fix typo in link
...
Co-Authored-By: jvz <boards@gmail.com >
2019-01-11 11:27:03 -06:00
Matt Sicker
c35f3ba75c
Add more tests for JENKINS-55448
...
This also refactors some test calls to mklink into a package-private Util method due to additional tests needing to create junction points.
Signed-off-by: Matt Sicker <boards@gmail.com >
2019-01-11 10:35:57 -06:00
Matt Sicker
84b1193378
Use explicit functional interface for path checking
...
Signed-off-by: Matt Sicker <boards@gmail.com >
2019-01-10 14:10:32 -06:00
Matt Sicker
88b515d4bf
Revert Util.isSymlink behavior
...
The simplified form that this replaces has an issue where a file contained somewhere inside a symbolic link is also considered a symbolic link on Windows.
Signed-off-by: Matt Sicker <boards@gmail.com >
2019-01-10 13:54:14 -06:00
Matt Sicker
59880c2fcd
Add path filter support to PathRemover
...
This allows for simplifying FilePath to use PathRemover rather than duplicating logic.
Signed-off-by: Matt Sicker <boards@gmail.com >
2019-01-10 13:40:17 -06:00
Baptiste Mathus
835cd9c6bc
Update '@since TODO' using the newly introduced tool
2019-01-08 22:56:31 +01:00
Jeff Thompson
85cc922e85
Merge branch 'security-stable-2.138' into security-stable-2.150
2019-01-03 10:05:19 -07:00