Commit Graph

267 Commits

Author SHA1 Message Date
Stephen Connolly bb7c8fcedb Jenkins.getInstance() should be non-null
- It is never too late to do the right thing.
- The vast majority of usages of `Jenkins.getInstance()` in core currently assume that its return value is non-null
- This commit changes those that are written to correctly check for non-null values will call `Jenkins.getInstanceOrNull()`
- We deprecate the `Jenkins.getActiveInstance()` madness
- I checked with @kohsuke who said not to bother with a PR and just commit this strongly opinionated change direct to master as a PR will just degrade into a bikeshedding.
2016-03-07 22:08:36 +00:00
Jesse Glick 1cbbb23923 Replaced Job.logRotator with BuildDiscarderProperty. 2015-10-27 16:51:15 -04:00
Vojtech Juranek 8f29260b17 [FIXED JENKINS-29507] Make JenkinsRule useable on systems without glibc 2015-09-17 19:56:51 +02:00
Veres Lajos d58903558e typofix - https://github.com/vlajos/misspell_fixer 2015-08-11 16:34:13 +01:00
Oleg Nenashev d5d8463e37 Merge pull request #1468 from synopsys-arc-oss/JENKINS-25734
[JENKINS-25734] - Prevent NPE in Executor/causeOfDeath page on "expected thread death"
2015-06-13 13:15:09 +03:00
Oleg Nenashev bf7f14b165 [JENKINS-25734] - Prevent NPE in Executor/causeOfDeath page if the field is null
The change does not fix the issue, but it suppresses NPE at least.
2015-06-07 16:05:35 +03:00
Oleg Nenashev fd42e33d61 Merge pull request #1661 from deadmoose/deprecated_annotations
Add @Deprecated annotations to things documented as @deprecated.
2015-04-22 16:21:45 -07:00
Kohsuke Kawaguchi 86bf6b7603 Allow the advertised TCP slave agent port number to be modified.
This allows TCP slave agent port to be reverse proxied.
2015-04-21 08:26:54 -07:00
David Hoover 1709ed3a2e Add @Deprecated annotations to things documented as @deprecated. 2015-04-19 14:50:12 -07:00
Stephen Connolly 1c253bb352 fix the @since tags 2015-03-26 15:22:33 +00:00
Stephen Connolly 9cd00e40dd added `@since` tag as requested by @jglick 2015-03-25 10:30:45 +00:00
Stephen Connolly 92147c3597 [FIXED JENKINS-27565] Refactor the Queue and Nodes to use a consistent locking strategy
The test system I set up to verify resolution of customer(s)' issues driving this change, required
additional changes in order to fully resolve the issues at hand. As a result I am bundling these
changes:

- Moves nodes to being store in separate config files outside of the main config file (improves performance) [FIXED JENKINS-27562]
- Makes the Jenkins is loading screen not block on the extensions loading lock [FIXED JENKINS-27563]
- Removes race condition rendering the list of executors [FIXED JENKINS-27564] [FIXED JENKINS-15355]
- Tidy up the locks that were causing deadlocks with the once retention strategy in durable tasks [FIXED JENKINS-27476]
- Remove any requirement from Jenkins Core to lock on the Queue when rendering the Jenkins UI [FIXED-JENKINS-27566]
2015-03-24 14:48:47 +00:00
Jesse Glick 4a98beaf64 Using ExtensionList.lookup consistently. 2014-08-04 15:55:22 -04:00
tfennelly 42190ed977 <l:icon> tag 2014-07-30 15:52:15 +01:00
Daniel Beck 578b513f53 Merge pull request #1303 from daniel-beck/JENKINS-18902
[FIXED JENKINS-18902] Exclude lower bound of range from changes
2014-07-27 17:46:46 +02:00
tfennelly de6ea1ab52 IE compatibility mode tweaks
Set "X-UA-Compatible" meta tag (MSIE browsers only - forces browser compatibility mode)
JS based warning if Document Mode doesn't match IE version (MSIE browsers only)
2014-07-17 19:14:59 +01:00
Daniel Beck 25acdd8850 [FIXED JENKINS-18902] Exclude lower bound of range from changes 2014-06-28 20:26:32 +02:00
Jesse Glick 3f2958795c ${h.breakableString(…)} might be called with a null argument if something is broken.
For robustness, pass on the null to Jelly rather than failing page rendering.
2014-04-30 18:19:17 -04:00
Oliver Gondža a7eb8b7eb3 Merge pull request #1195 from daniel-beck/JENKINS-22670
[FIXED JENKINS-22670] Less aggressive word breaking
2014-04-18 19:20:55 +02:00
Daniel Beck 35b0094137 [FIXED JENKINS-22670] Less aggressive word breaking 2014-04-17 21:49:15 +02:00
Jesse Glick 747d550c3c isMatrixProject ought to handle nulls, just in case. 2014-04-14 23:20:12 -04:00
Jesse Glick d72fda46a6 isMatrixProject appears unused, but keep for compatibility. 2014-04-14 19:08:43 -04:00
Jesse Glick 7f033ec9fa p:config-upstream-pseudo-trigger is actually applicable to AbstractProject, not only Project. 2014-04-09 18:31:38 -04:00
Jesse Glick bcc8614856 [FIXED JENKINS-18364] Functions.getRelativeLinkTo is called many times during rendering, so skip checking View.getItems which is expensive. 2014-04-01 10:53:25 -04:00
Jesse Glick abc77438d2 Merge branch 'security' into security-rc
Conflicts:
	core/src/main/java/hudson/Functions.java
	core/src/main/java/hudson/markup/MyspacePolicy.java
	core/src/main/java/hudson/util/RobustReflectionConverter.java
	core/src/main/resources/lib/layout/layout.jelly
	war/pom.xml
2014-02-11 21:00:54 -05:00
Jesse Glick bf53919856 [FIXED SECURITY-93] PasswordParameterDefinition should serve existing default value in encrypted form.
And strengthen functional tests (using configRoundTrip) to ensure that the same mistake is not made elsewhere.
2014-02-11 14:19:39 -05:00
Jesse Glick a0b00508ee [FIXED SECURITY-77] XSS in iconSize cookie. 2014-02-11 14:17:00 -05:00
Oliver Gondža ca139a7c9f Merge pull request #1058 from olivergondza/breakable-regex
[FIXED JENKINS-20928] l:breakable mishandles HTML metacharacters
2013-12-12 07:49:16 -08:00
Oliver Gondža 3f1f122ff4 [FIXED JENKINS-20928] l:breakable mishandles HTML metacharacters 2013-12-12 15:16:13 +01:00
Jesse Glick c5e23739fa [JENKINS-20892] Partial fix of poor scalability in /builds and related displays. 2013-12-06 18:21:57 -05:00
Jesse Glick a900b488b5 [FIXED JENKINS-20800] HTML metacharacters not escaped in log messages. 2013-11-27 18:32:22 -08:00
Bruno Kühnen Meneguello cdf45c6439 [FIXED JENKINS-5622] Allow build queue list to be collapsed 2013-11-22 14:38:38 -02:00
Jesse Glick 4825967fe3 Deleting code using @IgnoreJRERequirement for Java 5 compatibility. 2013-11-15 08:43:40 -05:00
Kohsuke Kawaguchi dfc2f57d19 this can happen so early in the game that j might be null
"Jenkins is loading" page gets set up before Jenkins instance gets
initialized.
2013-11-05 12:29:51 -08:00
Jesse Glick 5b7543159d It is Thread.getThreadGroup that can return null, not ThreadGroup.getName.
https://jenkins.ci.cloudbees.com/job/core/job/jenkins_main_trunk/1436/testReport/hudson.model/UpdateCenter2Test/install/
java.lang.NullPointerException: null
	at hudson.Functions$ThreadSorterBase.<init>(Functions.java:1151)
	at hudson.Functions$ThreadSorterBase.<init>(Functions.java:1142)
	at hudson.Functions$ThreadGroupMap.<init>(Functions.java:1163)
	at hudson.Functions.sortThreadsAndGetGroupMap(Functions.java:1136)
	at org.jvnet.hudson.test.JenkinsRule$2.evaluate(JenkinsRule.java:482)
2013-10-31 13:43:55 -04:00
Jesse Glick dceac8f0ac [FIXED JENKINS-19173] Added ContextMenuVisibility marker interface for Action’s. 2013-10-23 10:44:01 -04:00
Jesse Glick bac8b9795a Clarified Javadoc: non-display names use '/' as a separator. 2013-10-21 15:34:17 -04:00
Jesse Glick 0e3afeb6c5 Sources are UTF-8 so might as well use the raw character when specifying something that will be a part of output. 2013-10-21 14:20:24 -04:00
Jesse Glick 587c6fe317 [FIXED JENKINS-20085] Overflow in Jenkins.globalIota. Simpler and safer to use an AtomicLong. 2013-10-16 13:40:34 -04:00
Jesse Glick 99f84bc8e0 7232798611 mistakenly made a new method deprecated. 2013-08-27 17:34:07 -04:00
evernat 3835b3fcc7 Optimize String appends in hudson.Functions 2013-08-26 21:15:35 +02:00
Kohsuke Kawaguchi 7232798611 [FIXED JENKINS-19124]
Added another attribute 'checkDependsOn' on <input> elements (akin to
'fillDependsOn', etc) to list up the other dependency controls, and
insert appropriate onchange events.

'checkUrl' is now just the stem portion of the URL to invoke, and
the client script builds up the query parameters.
2013-08-08 16:24:09 -07:00
Jesse Glick 535247e169 Clearer display of log messages: chronological order, and coloration of repeated vs. fresh metadata. 2013-07-22 13:55:08 -04:00
Mark Waite 7f521e729a Fix javadoc warnings in method parameters 2013-07-19 14:36:02 -06:00
Kohsuke Kawaguchi 7bf67b6d0e Avoid code duplication 2013-07-16 21:40:27 -07:00
Christoph Kutzinski e9e9d3276f removed the noAnime() conversions, so we can rely on the compiler to warn us, if we forget a case here 2013-07-14 11:44:35 +02:00
Christoph Kutzinski 852c2f1f69 suppress some pointless warnings 2013-07-14 11:38:58 +02:00
Christoph Kutzinski db6e1d3a36 added @since 2013-07-14 11:35:42 +02:00
Vojtech Juranek 4f2626aaac Add convenient method for checking if object is MatrixProject
This is useful for jelly pages where instanceof operator doesn't work.
2013-07-03 16:11:15 +02:00
Stephen Connolly 48e8010231 [JENKINS-18381] Provide a mechanism to differentiate between node
properties that are applicable to the master node only and node properties
that can be applied to all nodes
2013-06-18 10:54:12 +01:00