Kanstantsin Shautsou
1f476da2e1
Don't use onloadable things in remoting mkdirs calls.
...
mkdirs do remoting call by creating anonymous class.
Remoting on remote side must load outer FilePath class with imports.
FilePath had SystemProperties OnMaster.
2017-10-09 11:29:41 +03:00
Oliver Gondža
fd08d75213
Merge branch 'master' into JENKINS-19473
2017-09-24 16:05:51 +02:00
Oliver Gondža
3f3e3b80a0
[JENKINS-21905] Take advantage of suppressed exceptions
2017-09-24 16:04:50 +02:00
Oliver Gondža
4948d60345
[JENKINS-21905] Do not rewrap possibly more specific exception into a less specific one
2017-09-24 16:04:45 +02:00
Oliver Gondža
a9d7caa81f
[JENKINS-21905] Unwrap the unnecessary ExecutionExceptions
2017-09-24 16:04:38 +02:00
Nicolas De Loof
6c5856ed21
prefer ‘agent.jar’ over ‘slave.jar’
2017-09-07 09:46:10 +02:00
Oleg Nenashev
095310afdd
Annotate and document methods of hudson.Launcher ( #2920 )
...
* Annotate and document methods of hudson.Launcher
* Fix newly introduced FindBugs issues in hudson.Launcher
* Remove brackets from FilePath#createLauncher() to avoid the merge conflict
2017-06-24 19:17:11 +02:00
Jesse Glick
064bdbbe09
FilePath.listDirectories() was documented to never be null, but this was not in fact so.
...
FilePath.list() did not specify, but at least DownloadFromUrlInstaller assumed it was non-null.
2017-06-12 13:27:02 -04:00
Stephen Connolly
3871d7778e
[JENKINS-43531] Plugins may not be expecting InvalidPathException
...
- Plugins should really be expecting it, but as historically they have not, may as well convert to IOE for them
2017-04-19 14:04:33 +01:00
Jesse Glick
7c16d8dc46
Fix Javadoc generation on JDK 8.
2017-04-11 09:26:45 -04:00
Jesse Glick
23cb13aad0
Clean up usages of IOUtils.closeQuietly and related calls ( #2830 )
...
* Clean up usages of IOUtils.closeQuietly and related calls predating Java 7.
* Review comments from @oleg-nenashev.
* Noticed another place where try-with-resources would protect against a potential leak.
2017-04-08 00:41:27 +02:00
Stephen Connolly
f0cd7ae8ff
[JENKINS-42934] Avoid using new FileInputStream / new FileOutputStream
2017-03-20 12:50:46 +00:00
Josh Soref
496703d0fe
Spelling fixes in changelogs, Javadoc, logs and UI ( #2718 )
...
* spelling: abstract
* spelling: about
* spelling: absolute
* spelling: across
* spelling: activity
* spelling: actually
* spelling: addition
* spelling: allocating
* spelling: ambiguous
* spelling: analyzes
* spelling: analysis
* spelling: another
* spelling: appear
* spelling: arbitrary
* spelling: artifact
* spelling: assignment
* spelling: associated
* spelling: augment
* spelling: authentication
* spelling: automatically
* spelling: available
* spelling: availability
* spelling: because
* spelling: background
* spelling: beginning
* spelling: boolean
* spelling: browsers
* spelling: building
* spelling: calculation
* spelling: channel
* spelling: column
* spelling: concatenation
* spelling: connect
* spelling: contribute
* spelling: convert
* spelling: copied
* spelling: couldn't
* spelling: scrambled
* spelling: creates-a
* spelling: curr-entry
* spelling: customize
* spelling: diagnostic
* spelling: contain
* spelling: default
* spelling: delimiter
* spelling: descriptor
* spelling: disambiguates
* spelling: different
* spelling: diligently
* spelling: disabled
* spelling: discovered
* spelling: display
* spelling: doesn't
* spelling: dollar
* spelling: downstream
* spelling: dynamically
* spelling: preemptively
* spelling: encrypt
* spelling: erroneous
* spelling: examine
* spelling: existence
* spelling: value
* spelling: february
* spelling: handling
* spelling: hostname
* spelling: convenient
* spelling: identify
* spelling: implementation
* spelling: incorrect
* spelling: individual
* spelling: initialization
* spelling: initialized
* spelling: inputstream
* spelling: instantiated
* spelling: instantiation
* spelling: intended
* spelling: interpreted
* spelling: interrupted
* spelling: invocations
* spelling: kern
* spelling: localization
* spelling: logger
* spelling: malfunctioning
* spelling: methods
* spelling: monitor
* spelling: mutator
* spelling: multiple
* spelling: object
* spelling: configured
* spelling: optionally
* spelling: option
* spelling: overridden
* spelling: parameterized
* spelling: parent
* spelling: permissions
* spelling: plugin
* spelling: potentially
* spelling: preferable
* spelling: problems like
* spelling: programmatically
* spelling: property
* spelling: reallocate
* spelling: recommended
* spelling: redirected
* spelling: registered
* spelling: reliable
* spelling: remember
* spelling: recurrence
* spelling: repeatable
* spelling: repeated
* spelling: resource
* spelling: retrieve
* spelling: returned
* spelling: revision
* spelling: sandwich
* spelling: separator
* spelling: serialization
* spelling: settings
* spelling: shadow
* spelling: should
* spelling: someone
* spelling: source
* spelling: specified
* spelling: style
* spelling: subversion
* spelling: sufficient
* spelling: supplementary
* spelling: suppressing
* spelling: synchronization
* spelling: synchronized
* spelling: this
* spelling: transitioning
* spelling: termination
* spelling: trying
* spelling: truncatable
* spelling: unknown
* spelling: undeployed
* spelling: unnecessary
* spelling: unparseable
* spelling: update
* spelling: upper
* spelling: verify
* spelling: visible
* spelling: warning
* spelling: we're
* spelling: whitespace
* spelling: wide
* spelling: with
* spelling: workspace
* spelling: yielding
* spelling: to
* spelling: by
* spelling: the
* spelling: hours
2017-02-12 13:38:30 +03:00
Jesse Glick
76aa0727f0
Functions.printStackTrace utility method.
2016-12-12 17:56:24 -05:00
Jesse Glick
24aa20635d
Replaced other usages of printStackTrace.
2016-12-12 16:44:10 -05:00
Daniel Beck
72cb842b6c
Cleaning up @since TODO / @since XXX
2016-10-15 23:22:20 +02:00
Andres Rodriguez
b62ad15fef
[JENKINS-38814] Use GREEDY RemoteInputStreams ( #2583 )
2016-10-12 08:45:38 -07:00
Nicolas De Loof
7b39424495
rely on try-with-resources
2016-10-03 15:12:48 +02:00
Oleg Nenashev
fdabb52503
Merge branch 'master' into JENKINS-34755
...
Conflicts:
core/src/main/java/hudson/FilePath.java
2016-05-13 23:00:17 +02:00
Vincent Latombe
0c16c8576b
[JENKINS-23507] Make FilePath.installIfNecessaryFrom follow redirects ( #2331 )
2016-05-13 12:36:45 +02:00
Oleg Nenashev
ce8922bd74
Merge branch 'master' into JENKINS-34755
...
Conflicts:
core/src/main/java/hudson/Util.java
core/src/main/java/hudson/WebAppMain.java
core/src/main/java/hudson/model/Item.java
core/src/main/java/hudson/model/Queue.java
core/src/main/java/hudson/model/UpdateCenter.java
core/src/main/java/hudson/security/csrf/DefaultCrumbIssuer.java
core/src/main/java/hudson/slaves/NodeProvisioner.java
core/src/main/java/jenkins/model/Jenkins.java
core/src/main/java/jenkins/slaves/NioChannelSelector.java
core/src/main/java/jenkins/util/xml/XMLUtils.java
2016-05-12 12:05:24 +02:00
Daniel Beck
869f66cc07
Merge branch 'master' of github.com:jenkinsci/jenkins into 2.0
...
Conflicts:
changelog.html
cli/pom.xml
core/pom.xml
core/src/main/java/hudson/ProxyConfiguration.java
core/src/main/java/jenkins/model/Jenkins.java
core/src/main/java/jenkins/slaves/JnlpSlaveHandshake.java
core/src/main/resources/hudson/model/Messages_da.properties
pom.xml
test/pom.xml
war/pom.xml
2016-03-16 19:00:40 +01:00
Stephen Connolly
96150d3a46
Jenkins.getInstance() will be @Nonnull in Jenkins 2.0+
...
- Code that is running from a plugin and on the master's JVM is guaranteed to never get null from this method (any cases where you do get null are bugs in core)
- Code that is running from a plugin and on a remote JVM should never be allowed to load the Jenkins class in their classloader, so should never use Jenkins.getInstance()... we are annotating the method with @Nullable so that such code can have some evolution time
- Code that is running in core and on one of two special paths should use the Jenkins.getInstanceOrNull() method so that the UI can be presented to users before the singleton has been instantiated / after the singleton has been destroyed
- The remaining 95% of uses in core (and 100% of uses in plugins) can safely assume that the instance is never null
2016-03-08 21:15:43 +00:00
Stephen Connolly
d1dfbd2baf
Revert "Jenkins.getInstance() should be non-null"
...
This reverts commit bb7c8fcedb .
Closes #2090 , I'll redo this as a PR... though if that PR is subject to multiple rounds of review before being merged then I will take that of evidence of the exact problem that committing directly was supposed to resolve... namely exponentially multiplying the effort required to make actual improvements to the code base.
2016-03-08 21:09:28 +00:00
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
Antonio Muñiz
320e6c0702
Slave to Agent renaming - Javadocs and logs
2016-01-29 17:40:26 +01:00
Johannes Ernst
9303136c9d
Incorporated pull request feedback:
...
* moved to jenkins.util.SystemProperties
* consistent naming getString/getInteger/getBoolean
* improved code formatting
Improved JavaDoc
2015-11-18 18:26:41 +00:00
Johannes Ernst
709fe5b9aa
Allow setting of system properties from context.xml in addition to setting from command-line.
...
Accomplished by centralizing calls to System.getProperty(String) and related into new file SystemProperties.java.
There, we first check for existence of system property; if not, we look for property in context.xml
This is done for "application" properties (like hudson.DNSMultiCast.disabled) but not for java properties (like user.name)
2015-11-17 01:38:51 +00:00
Christopher Simons
7efb9090dd
remove unused import statements
...
In addition to cluttering the namespace, unused imports generate
compiler warnings, introducing noise and obscuring more important
compiler warnings. This change removes them.
2015-11-10 10:13:52 -05:00
Oleg Nenashev
4fd10ed723
Merge pull request #1429 from dominiquebrice/jenkins-5253b
...
[JENKINS-5253] Allow case insensitive patterns in Artifacts Archiving
2015-10-17 22:15:52 +03:00
Kanstantsin Shautsou
03bd5959cb
Revert "Revert "[JENKINS-10629] - Migrate the Tar archives handling code to commons-compress""
...
This reverts commit 8f1280a85c .
2015-08-25 01:09:08 +03:00
Veres Lajos
d58903558e
typofix - https://github.com/vlajos/misspell_fixer
2015-08-11 16:34:13 +01:00
Oleg Nenashev
ca21c65bf2
Merge pull request #1667 from oleg-nenashev/JENKINS-10629-FIX
...
[JENKINS-28013,JENKINS-28012] - Revert changes for JENKINS-10629
2015-04-23 09:07:34 -07:00
Oleg Nenashev
8f1280a85c
Revert "[JENKINS-10629] - Migrate the Tar archives handling code to commons-compress"
...
This reverts commit b6c7b83e7b .
2015-04-22 17:22:44 -07:00
David Hoover
1709ed3a2e
Add @Deprecated annotations to things documented as @deprecated.
2015-04-19 14:50:12 -07:00
Oleg Nenashev
b6c7b83e7b
[JENKINS-10629] - Migrate the Tar archives handling code to commons-compress
2015-04-14 19:02:32 +03:00
Dominique
40382c5fc4
[JENKINS-5253] Allow case insensitive patterns in Artifacts Archiving
2015-01-31 19:39:10 -05:00
Jesse Glick
36bce39ff4
[FIXED JENKINS-26476] Work around Remoting problem by avoiding reference to Functions.
2015-01-16 14:24:52 -05:00
Jesse Glick
1fcee97d2f
[FIXED JENKINS-26196] More robust handling of server errors in FilePath.installIfNecessaryFrom.
2014-12-29 14:49:27 -05:00
Jesse Glick
c527628db9
installIfNecessaryFrom Javadoc improvements and nullness annotations.
2014-12-29 12:18:53 -05:00
Jesse Glick
534328b264
[FIXED JENKINS-25759] Avoid consuming too much memory while running validateAntFileMask.
...
Not fully solved, since the scannedDirs field can still grow to be large, but at least clearing files/dirsNotIncluded.
Also imposing a 5s timeout on the scan regardless of file count, and defining a user-customizable bound.
2014-11-24 10:37:58 -05:00
Jesse Glick
8c10c75d85
Merge branch 'security-rc' into SECURITY-144-rc
2014-10-28 11:20:25 -04:00
Jesse Glick
0434a2ac4a
readFromOffset needed to be adjusted too.
2014-10-26 15:47:47 -07:00
Jesse Glick
300b6fa519
Forgotten @since.
2014-10-26 13:58:40 -07:00
Jesse Glick
f0658e233d
Merge branch 'security-rc' into SECURITY-144-rc
...
Conflicts:
core/src/main/java/hudson/FilePath.java
2014-10-26 13:55:39 -07:00
Jesse Glick
97b2f931ae
Merge branch 'SECURITY-144' into SECURITY-144-rc
2014-10-20 08:57:11 -04:00
Kohsuke Kawaguchi
8a105ce57c
Adding separate check for symlink to prevent jailbreak
...
Otherwise a symlink can be created to point to a file outside $JENKINS_HOME and be read
2014-10-17 19:03:55 -07:00
Jesse Glick
c94c1716f3
Merge branch 'SECURITY-144' into SECURITY-144-rc
...
Conflicts:
core/src/main/java/hudson/FilePath.java
core/src/main/java/hudson/PluginManager.java
core/src/main/java/hudson/PluginWrapper.java
2014-10-17 10:59:32 -04:00
Kohsuke Kawaguchi
c20308c3fa
Making FilePathFilter itself more composable
2014-10-16 16:55:17 -07:00
Jesse Glick
32376946b8
Merge branch 'SECURITY-144' into SECURITY-144-rc
...
Conflicts:
core/src/main/java/hudson/FilePath.java
2014-10-16 13:18:39 -04:00