Commit Graph
175 Commits
Author SHA1 Message Date
Basil Crow 9ce1ff4e7c Remove AntClassLoader (#7846) 2023-04-25 09:39:41 +02:00
Basil Crow a0faeaee3c Use diamond operator where possible (#6764) 2022-07-04 10:32:38 -07:00
Basil Crow 6d179998e1 Use Java 11 methods where possible (#6700) 2022-06-30 09:31:36 -07:00
Basil Crow 62fbc3aed1 Use URLClassLoader by default (#6571) 2022-05-15 10:41:23 -07:00
Basil Crow e27b310065 Enable whitespace-related Checkstyle checks (#6149) 2022-01-03 08:55:03 -08:00
Basil Crow b25b45bc90 Remove trailing whitespace (#6138) 2021-12-31 07:54:03 -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 165d559469 Fix RV_RETURN_VALUE_IGNORED_BAD_PRACTICE SpotBugs violations (#6025) 2021-12-11 12:51:46 -08:00
Basil CrowandJesse Glick bccbc865e4 URLClassLoader support for PluginFirstClassLoader (#5970)
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
2021-12-10 09:51:57 -08:00
Basil Crow 1290af7ce1 Clean up usages of ClassLoaderReflectionToolkit (#5895) 2021-11-12 08:01:28 +00:00
Basil Crow 8be712947f Fix typo in ClassicPluginStrategy (#5894) 2021-11-08 20:32:58 +00:00
Stefan Spieker e8388da1ae suppress Spotbugs for system properties to keep accessible for system groovy console 2021-10-03 11:22:59 +02:00
Basil Crow 632033d6ad Sort imports (#5732) 2021-09-18 09:39:42 +01:00
Basil Crow a8c4d753d4 Revive support for URLClassLoader in ClassicPluginStrategy (#5698) 2021-09-07 08:09:23 +01:00
Basil Crow 725dd933d6 [JENKINS-23784] - Register DependencyClassLoader in the default plugin strategy as parallel-capable (#5699) 2021-09-05 19:08:17 +01:00
Jesse Glick b23b674fc4 Merge branch 'master' of https://github.com/jenkinsci/jenkins into anonymous-to-lambda 2021-08-30 14:18:15 -04:00
Basil Crow 95d9b55e6f Align resource loading logic in AntClassLoader with upstream (#5656) 2021-08-15 20:34:01 +01:00
Basil Crow 27d7acc810 Replace some anonymous classes with lambdas 2021-07-05 11:14:36 -07:00
offa 7143bf7c24 Commented out code removed. 2021-07-01 17:15:05 +02:00
Basil CrowandTim Jacomb 2760e3ebfb Remove Bytecode Compatibility Transformer (#5526)
* Remove Bytecode Compatibility Transformer

* AntClassLoader2 is now redundant

Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2021-06-01 13:06:30 +08:00
Basil Crow 52acfa962f Remove usages of deprecated (in Java 9 and above) Class#newInstance (#5483)
* Remove usages of deprecated (in Java 9 and above) `Class#newInstance`

* Improve catching of InvocationTargetException

* Use AssertionError where appropriate
2021-05-16 07:27:32 +02:00
Basil Crow f6378676b1 Add missing @Override annotations (#5430) 2021-04-28 17:28:25 +08:00
Basil Crow 881365d30b Enable RedundantModifier Checkstyle check 2021-03-08 07:56:42 -08:00
StefanSpieker 58499905f8 replaced MS_SHOULD_BE_FINAL general spotbugs exclude with individual excludes (#5235) 2021-03-08 07:58:49 +00:00
Basil Crow bd1d5e09bd Add missing @Override annotations 2021-03-02 14:04:48 -08:00
Basil Crow 7fb2511ee8 Use native Java functionality rather than Guava's Lists#newArrayList, Maps#newHashMap, and Sets#newHashSet where possible 2021-02-25 17:02:24 -08:00
Oleg Nenashev b49610e29f Cleanup warnings for missing getPlugin() null checks (#5222) 2021-02-10 19:52:44 +00:00
JonandJon Sten f0fc1b8389 Log if no class paths was found for plugin (#5154)
Co-authored-by: Jon Sten <jons@axis.com>
2021-01-18 16:06:18 +00:00
Oleg Nenashev b8b2c47586 Revert "Omit stacktraces on ClassNotFoundException in PluginStrategy classloading (#4957)"
This reverts commit b62b6dd830.
2020-10-14 21:09:26 +02:00
StefanSpiekerandRaihaan Shouhell 4499ad6ffd Replace deprecated NullOutputStream (#4989)
Co-authored-by: Raihaan Shouhell <raihaanhimself@gmail.com>
2020-10-13 08:10:55 +01:00
Oleg Nenashev b62b6dd830 Omit stacktraces on ClassNotFoundException in PluginStrategy classloading (#4957)
* Omit stacktraces on ClassNotFoundException in PluginStrategy classloading

* Modify implementation to not fill in stacktraces by default

* Apply suggestions from code review

* Restrict withFillInStackTracesOnClassNotFoundException() at Beta API
2020-10-12 11:21:38 +02:00
Daniel Beck d8080d2e96 Note deprecation of ClassicPluginStrategy#useAntClassLoader 2020-06-01 16:34:13 +02:00
Daniel Beck d24b1df0d8 Fill in further 'since' TODO comments 2020-05-03 16:28:37 +02:00
James Nord 819f80b12f s/javax.annotation.Nonnull/edu.umd.cs.findbugs.annotations.NonNull/g 2020-03-26 11:14:41 +00: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 37fc33f92d Correct spelling 2020-01-23 14:55:59 -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
Basil Crow 20786f087b Fix dangling Javadocs 2019-10-19 14:02:59 -07:00
Raihaan Shouhell 61e87f1807 Avoid boxed primitive 2019-10-01 13:50:49 +08:00
Jesse Glick 3bcdefcae4 [JENKINS-55582] Refinement to at least handle nonstandard $JENKINS_HOME/plugins/$shortName.hpi and warn about $shortName-$version.hpi. 2019-05-23 13:26:15 -04:00
Jesse Glick 855ea2eea2 [JENKINS-57528] - Load detached plugins which are implicit deps of other plugins at startup even w/o UC (#4000)
* Do not warn repeatedly of the same missing update site dependency.
This happens when locally testing split plugins (despite their presence in WEB-INF/detached-plugins/*.hpi).

(cherry picked from commit 918a0fd221)

* Detached plugins must be kept up to date with security advisories.

(cherry picked from commit e08d28a698)

* Load detached plugins which are implicit dependencies of other plugins at startup, even if the update center was not used.

(cherry picked from commit ad7a36001d)

* Adjusted expected version after e08d28a698.

(cherry picked from commit 84f939cebd)

* e08d28a698 exposed tests which had been incorrectly storing plugins as *.hpi rather than *.jpi.

(cherry picked from commit a0abad7ec4)

* Test failure after ad7a36001d.

(cherry picked from commit 0084e8dbdd)

* Another test failure after ad7a36001d30a6174b25e616fc3c215dd24919d1; fewer installDetachedPlugin calls are now required.

(cherry picked from commit b65bb54e99)
2019-05-17 16:22:22 +02:00
Josh Soref 003e525b79 Java can infer types for <> 2019-02-21 00:33:38 -05:00
Josh Soref 3d8c3c417c Remove useless initialization 2019-02-20 23:35:12 -05:00
Josh Soref 36fa47add2 noinspection StatementWithEmptyBody 2019-02-20 23:15:14 -05:00
Josh Soref 264980c707 Java 7: omit explit type in favor of <> 2019-02-20 21:51:03 -05:00
Baptiste Mathus a78312ea0f [JENKINS-55681] - Make JAXB a detached plugin only on Java 11 (#3865)
* Move detached plugins logic into a dedicated class

ClassicPluginStrategy is already long enough, so trying to make things a
bit more focused before adding Java 11 logic. (and even if not, the change
still splits a class that is almost 1k lines).

* Install jaxb as detached only on Java 11+

* Remove duplicate @Restricted

Given the enclosing class already has it.

* Use 1.5 release

* Add more test coverage

* getMinJavaVersion => getMinimumJavaVersion

* Rename DetachedPluginsManager as DetachedPluginsUtil

as requested by Oleg and Jesse. Mainly because of the misleading
relationship (there's no inheritance) with the existing `PluginManager`
class.

* 🤦 adjust to 1.5 release method renaming

* Clarify minimum Java version column

Co-Authored-By: batmat <bmathus@gmail.com>

* Update to 2.3.0 version of the jaxb plugin

* Bump minimum core version to next expected release version

* Add preventive cycle breaks for jaxb while waiting for JENKINS-28942

As requested by Oleg.

* Add test to fail fast on wrong format for split-plugins.txt
2019-02-03 10:56:26 +01:00
Oleg Nenashev 150de1df6e Merge pull request #3640 from oleg-nenashev/build/jdk11-underscore-vars
JDK-11 support: refactor code to avoid underscore variable names
2018-09-27 18:08:51 +02:00
Oleg Nenashev 8598492f19 Ignored Exceptions: use ‘ignored’ to supress IntellijIDEA warnings as suggested by @daniel-beck 2018-09-27 01:23:28 +02:00
Oleg Nenashev 297e4e3d85 [JENKINS-53793] - Suppress DMI_COLLECTION_OF_URLS in ClassicPluginStrategy
It starts failing FindBugs runs against Java 11.
The implementation is not efficient, but it should not be a serious issue in this case
2018-09-27 00:31:15 +02:00
Oleg Nenashev a3cc7780aa JDK11 support: refactor code to avoid underscore variable names 2018-09-21 16:47:59 -07:00