Commit Graph
437 Commits
Author SHA1 Message Date
Jan Faracik ae0685ab82 Merge branch 'master' into keyboard-shortcut-animation 2024-08-04 15:01:26 +01:00
Basil Crow 1381726b2f Use isEmpty() where possible (#9383) 2024-06-14 07:21:57 -06:00
Basil Crow d2d1d0d20f Use pattern matching for instanceof (#9382) 2024-06-13 06:04:42 +01:00
Daniel Beck f925849ca7 Combine into one format string with escaped format placeholder 2024-05-19 19:39:25 +01:00
Tim Jacomb f0efb075f1 Merge branch 'master' into keyboard-shortcut-animation 2024-04-03 14:16:24 +01:00
Basil CrowandMark Waite 53b271283b Deprecate hudson.Util#XS_DATETIME_FORMATTER (#9088)
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
2024-03-30 07:29:29 -06:00
Basil Crow f8a6ee542d Deprecate Util#RFC822_DATETIME_FORMATTER (#9085) 2024-03-30 07:23:47 -06:00
Bob Du 8197702484 Further reduce usages of StringUtils (#9044)
* Remove usages of StringUtils#containsIgnoreCase

Signed-off-by: Bob Du <i@bobdu.cc>

* Remove usages of StringUtils#removeStart StringUtils#removeEnd

Signed-off-by: Bob Du <i@bobdu.cc>

* Remove usages of StringUtils#defaultString

Signed-off-by: Bob Du <i@bobdu.cc>

* Remove usages of StringUtils#defaultIfBlank

Signed-off-by: Bob Du <i@bobdu.cc>

* Remove usages of StringUtils#isAlphanumeric

Signed-off-by: Bob Du <i@bobdu.cc>

* Remove usages of StringUtils.EMPTY

Signed-off-by: Bob Du <i@bobdu.cc>

* Remove usages of StringUtils#split

Signed-off-by: Bob Du <i@bobdu.cc>

* Remove usages of StringUtils#startsWithIgnoreCase

Signed-off-by: Bob Du <i@bobdu.cc>

* Remove usages of StringUtils#countMatches

Signed-off-by: Bob Du <i@bobdu.cc>

* Remove usages of StringUtils#endsWithAny

Signed-off-by: Bob Du <i@bobdu.cc>

* fix spotbugs warning

Signed-off-by: Bob Du <i@bobdu.cc>

* Use Objects.toString

Signed-off-by: Bob Du <i@bobdu.cc>

* revert unrelated change

Signed-off-by: Bob Du <i@bobdu.cc>

---------

Signed-off-by: Bob Du <i@bobdu.cc>
2024-03-27 06:38:23 -06:00
Basil Crow 3c042d12b8 Reduce usage of StringUtils (#8999) 2024-03-01 23:18:05 +01:00
64607784f8 [JENKINS-60866][JENKINS-71513] Apply Stapler update for CSP-compliant st:bind and renderOnDemand (#6865)
* [JENKINS-60866] Apply Stapler update for CSP-compliant st:bind

* [JENKINS-60866] Make renderOnDemand CSP-compliant

* Thanks Spotless

* Make Stapler incrementals work

* Update Stapler to new incremental

* Fixup bad merge

* Update Stapler, add test demonstrating st:bind working

* Address review feedback

* Add test for null bind, update Stapler

* Checkstyle

* More tests

* Use released Stapler

---------

Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
Co-authored-by: Basil Crow <me@basilcrow.com>
2024-02-24 07:34:33 +01:00
Alexander Brandes 50bc384abd Fill in since todo (#8839) 2024-01-08 09:42:13 +00:00
Markus Winter 48da635be2 [JENKINS-71965] fix timezone in build history (#8800)
* [JENKINS-71965] fix timezone in build history

the timezone shown was always the daylight saving time when the users
selected timezone has daylight saving. The change will now consider the
actual timestamp of the build to determine if it was in daylight saving
time to properly calculate the timezone to show.

* make locale aware
2023-12-25 07:21:53 -07:00
Tim Jacomb ce09ad88d4 Update core/src/main/java/hudson/Functions.java 2023-12-17 08:07:48 +00:00
Jan Faracik 95be90440e Merge branch 'master' into keyboard-shortcut-animation 2023-11-26 17:52:54 +00:00
Markus Winter aad79effa1 [JENKINS-72009, JENKINS-72200, JENKINS-24947] various fixes and improvements around disk space monitoring (#8593) 2023-11-24 22:16:57 +00:00
Jan Faracik 3996dc06fb Address comments 2023-11-20 15:26:36 +00:00
Jan Faracik 231631dc31 Merge branch 'master' into keyboard-shortcut-animation 2023-11-20 15:06:49 +00:00
b9b3e6bfa8 [JENKINS-71715] Allow plugins with alternate build log visualizations to handle console links from core and other plugins (#8321)
* [JENKINS-71715] Allow plugins with alternate build log visualizations to handle console links from core and other plugins

* [JENKINS-71715] Apply suggestions with ordinal extension and @since TODO

* [JENKINS-71715] Public @Extension

* Add or fix @since todo

we usually don't put versions but put todo instead and these versions get resolved _after_ merges.

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>

* [JENKINS-71715] Apply suggestions from reviews

* [JENKINS-71715] Switch ConsoleURLProvider to interface and add Functions.getContextRelativeUrl

* [JENKINS-71715] Refactor ConsoleUrlProvider API and add Functions.getConsoleUrl method for use in Jelly files

* [JENKINS-71715] Fix casing of ConsoleURLProvider.java

* [JENKINS-71715] Add global and per-user configuration options for ConsoleUrlProvider

* [JENKINS-71715] Fix Javadoc reference

* [JENKINS-71715] Remove outdated TODO comment

* [JENKINS-71715] Miscellaneous updates based on review feedback

* [JENKINS-71715] Fix Javadoc links

* [JENKINS-71715] Update console links for build list and build time trend widgets

* [JENKINS-71715] Functions.getConsoleUrl must take Queue.Executable instead of Run

* [JENKINS-71715] Simplify test using WebClient.executeOnServer

* [JENKINS-71715] Add constructor

* [JENKINS-71715] Preserve old behavior of p:console-link as a fallback for atypical consumers

* [JENKINS-71715] Ignore invalid URLs and consult global providers if user providers fail to provide a valid URL

* [JENKINS-71715] Move ConsoleUrlProviderGlobalConfiguration into AppearanceCategory

* [JENKINS-71715] Hide AppearanceGlobalConfiguration if ConsoleUrlProviderGlobalConfiguration is disabled and would be the only option on the page

* [JENKINS-71715] Update help text and Javadoc based on review feedback, and filter out default provider in global config

Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>

* [JENKINS-71715] getProvidersDescriptors can be an instance method

---------

Co-authored-by: Baptiste Mathus <bmathus@gmail.com>
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
Co-authored-by: Devin Nusbaum <dnusbaum@cloudbees.com>
Co-authored-by: Devin Nusbaum <dwnusbaum@users.noreply.github.com>
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
2023-11-18 14:58:20 -07:00
Basil Crow 8c921e7a9e [JENKINS-72203] Revert jenkinsci/jenkins#8565 (#8637)
This reverts commit dc190bac8a.
2023-10-23 12:36:05 -07:00
dc190bac8a [JENKINS-72028] replace deprecated URL() at core/src/main/java/hudson/ (#8565)
* missing 'alt' attribute added

* missing 'alt' attribute added

* replaced 'new URL' to 'new URI' per Java 11 target codebase

* Revert "replaced 'new URL' to 'new URI' per Java 11 target codebase"

This reverts commit aeef4c1e4b.

* replaced deprecated URL() with URI#.toURL()

* updated code per review

* updated

* updated code

* added back file

* Update core/src/main/java/hudson/cli/InstallPluginCommand.java

Co-authored-by: James Nord <jtnord@users.noreply.github.com>

* Update core/src/main/java/hudson/TcpSlaveAgentListener.java

remove non required as per suggestion

Co-authored-by: James Nord <jtnord@users.noreply.github.com>

* Update core/src/main/java/hudson/model/UpdateSite.java

Co-authored-by: James Nord <jtnord@users.noreply.github.com>

* Update core/src/main/java/hudson/model/UpdateSite.java

* Spotless

---------

Co-authored-by: Alexander Brandes <mc.cache@web.de>
Co-authored-by: James Nord <jtnord@users.noreply.github.com>
2023-10-12 00:45:44 +02:00
Jan Faracik 0d8e1a2eca Init 2023-08-23 21:35:06 +01:00
Benoit Lacelle c48728d0f4 Use String#isEmpty where possible (#7690) 2023-04-08 08:04:47 -07:00
19896b3034 Updating the descriptions for the escape/encode functions (#7606)
* Updating the descriptions for the escape/encode functions

Adding explanations and examples to the encode and escape functions

* Updated description for encode 

I have edited some of the descriptions to bring them in line with the documentation over on husdon.Util

* Changed leading and trailing spaces on encode

I left one space at the end and added a note to say how a blank space is rendered

* Removed trailing whitespace to satisfy checkstyle

* Preserve formatting and escape HTML tags

* Update core/src/main/java/hudson/Functions.java

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>

* Changed escaping on examples so they rendered properly in the javadoc

I was tempted to use {@literal &amp;} notation but this added blank spaces, making the examples look strange.  Instead I have used the &amp;amp; notation.

* Update core/src/main/java/hudson/Functions.java

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>

* Update core/src/main/java/hudson/Functions.java

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>

* Update core/src/main/java/hudson/Functions.java

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>

* Update core/src/main/java/hudson/Functions.java

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>

* Update core/src/main/java/hudson/Functions.java

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>

* Update core/src/main/java/hudson/Functions.java

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>

---------

Co-authored-by: Alexander Brandes <mc.cache@web.de>
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
2023-02-09 11:35:55 +01:00
83bf69758c [JENKINS-68801] Fix for Functions#extractPluginNameFromIconSrc (#6902)
Co-authored-by: Temirlan Dyussyumbayev <bzzitsme@users.noreply.github.com>
Co-authored-by: Alexander Brandes <mc.cache@web.de>
2022-08-01 19:45:35 -07:00
Jesse Glick adda175d36 Deprecating Functions.singletonList (#6740) 2022-07-06 07:42:18 +01:00
Basil Crow 082634cf1e Update Javadoc links (#6767) 2022-07-04 10:32:53 -07:00
Basil Crow 6d179998e1 Use Java 11 methods where possible (#6700) 2022-06-30 09:31:36 -07:00
Tim Jacomb a7950b8cf1 Merge branch 'master' into icon_url 2022-06-22 23:15:43 +01:00
Vincent Latombe 3191a1baaa Add support for more edge cases 2022-06-09 18:12:14 +02:00
Daniel Beck 37bd66a43a [SECURITY-2777] 2022-06-09 03:46:23 +00:00
Vincent Latombe 78dd3193a4 Refactor parts of Functions#tryGetIconPath for testability
Add testing for Functions#guessIcon cases.

Refactor icons translation to a static block as it should happen only once.
2022-06-01 15:33:38 +02:00
Riliane ee76f917e8 JENKINS-68639
Check whether an icon path already contains the context path before appending the context path to it
2022-05-31 12:12:05 +03:00
Basil Crow e26d496c17 Work around JENKINS-68215 when running on Java 17 (#6600) 2022-05-25 22:38:21 -07:00
ikedamandTim Jacomb 0f90eba886 [JENKINS-68286] Allow extra classes with <layout:icon> (#6510)
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2022-05-09 07:47:33 +01:00
Basil Crow aaa6f730f6 Deprecate Functions#getServerName (#6545) 2022-05-07 15:28:30 -07:00
Tim Jacomb 387104fd86 [JENKINS-67849] Correct icon resolution for remote icons (#6476) 2022-04-15 06:22:40 -07:00
Jan Faracik 51e7142d57 Remove ui-refresh-overrides.less and UI refresh toggle 2022-04-14 05:50:30 -07:00
04887f08ce [JENKINS-68137] Enable custom icon symbols for plugins (#6395)
Co-authored-by: Ullrich Hafner <ullrich.hafner@gmail.com>
Co-authored-by: Tim Jacomb <timjacomb1+github@gmail.com>
2022-03-28 21:52:43 -07:00
5144035e55 Replace Tango icons with Jenkins Symbols (#6307)
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
Co-authored-by: Adrien Lecharpentier <adrien.lecharpentier@gmail.com>
Co-authored-by: Tim Jacomb <timjacomb1+github@gmail.com>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2022-03-22 07:46:49 +00:00
Zbynek Konecny 9472f1c960 Allow missing logger name in log viewer (#6310) 2022-03-01 09:04:59 -08:00
NotMyFault 45cb976292 Plugins may read icons from an URL 2022-02-18 23:11:51 +01:00
NotMyFault 74874f5380 fix: Don't append leading slash to foreign icons 2022-02-18 16:59:54 +01:00
Jan Faracik 81072df4f7 Add support for Ionicons (symbols) to <l:Icon> and <l:task> components (#6186) 2022-02-12 15:41:57 +00:00
280e38eb3a Modernise form components (#5923)
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
Co-authored-by: Tim Jacomb <timjacomb1+github@gmail.com>
2022-02-07 08:03:13 +00:00
Basil Crow e27b310065 Enable whitespace-related Checkstyle checks (#6149) 2022-01-03 08:55:03 -08:00
Basil Crow d5cea69751 Prevent new SpotBugs violations from being introduced (#6015) 2021-12-06 13:52:38 -08:00
Basil Crow 023620625f Enable ArrayTrailingComma Checkstyle check (#5961) 2021-11-30 12:50:10 +00:00
Basil Crow 632033d6ad Sort imports (#5732) 2021-09-18 09:39:42 +01:00
offa aa1f5ccbf3 Code clean up. 2021-07-01 17:26:42 +02:00
Basil CrowandDaniel Beck b8c20c6428 Fix violations of a handful of Error Prone checks (#5519)
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
2021-06-14 16:45:34 +01:00