Commit Graph
290 Commits
Author SHA1 Message Date
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
Jesse Glick ccbe96227f Merge branch 'security-rc' into SECURITY-144-rc
Conflicts:
	core/src/main/java/hudson/FilePath.java
	pom.xml
2014-10-16 13:18:08 -04:00
Kohsuke Kawaguchi 547cc241c0 untar() has the same problem as unzip() about the directionality of the read.
This code duplication in two sides of the if statement is undesirable.
Post-release, I need to come back here to introduce a variant of FileCallable that runs on the given FilePath but with InputStream to another FilePath.
2014-10-15 22:15:30 -07:00
Kohsuke Kawaguchi e37597a81d Unzipping a local zip into a remote directory results in the file getting read from remote.
This change flips the order so that the read happens locally, and pipe gets forwarded to the other side.
2014-10-15 19:51:49 -07:00
Jesse Glick adc218825d FilePath.read should rethrow any FileNotFoundException, SecurityException, etc. 2014-10-15 16:36:12 -04:00
Jesse Glick 698858fd92 Changes in remoting make wrapping IOException less necessary.
Still do it so we capture FilePath.remote (which many JRE methods suppress),
but fix the wrapper Throwable.message to include cause.toString() according to convention.
2014-10-15 16:12:10 -04:00
Kohsuke Kawaguchi e219d19613 Added a method to read a file from the middle 2014-10-13 17:31:08 -07:00
Jesse Glick 89cbfc4639 Merge branch 'SECURITY-144' into SECURITY-144-rc
Conflicts:
	core/src/main/java/hudson/EnvVars.java
	core/src/main/java/hudson/FilePath.java
	core/src/main/java/hudson/cli/ClientAuthenticationCache.java
	core/src/main/java/hudson/markup/MyspacePolicy.java
	core/src/main/java/hudson/model/Computer.java
	core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java
	core/src/main/java/hudson/node_monitors/ResponseTimeMonitor.java
	core/src/main/java/hudson/node_monitors/TemporarySpaceMonitor.java
	core/src/main/java/hudson/security/AbstractPasswordBasedSecurityRealm.java
	core/src/main/java/hudson/slaves/Channels.java
	core/src/main/java/hudson/slaves/SlaveComputer.java
	core/src/main/java/hudson/tasks/Fingerprinter.java
	core/src/main/java/hudson/tasks/Shell.java
	core/src/main/java/hudson/tasks/junit/JUnitParser.java
	core/src/main/java/hudson/tasks/test/DefaultTestResultParserImpl.java
	core/src/main/java/hudson/util/ProcessTree.java
	core/src/main/java/hudson/util/RemotingDiagnostics.java
	core/src/main/java/jenkins/model/Jenkins.java
	core/src/test/java/hudson/LauncherTest.java
	pom.xml
	test/src/test/java/hudson/tasks/junit/CaseResultTest.java
2014-09-26 15:56:48 -04:00
Kohsuke Kawaguchi 4f733244e6 Moving MasterToSlaveFileCallable/SlaveToMasterFileCallable to the top level classes.
If we ever decide to develop a compatibility thunk library for these changes to help promote deployment in plugins,
then these classes being a nested type is problematic as they'll fail to load under onld Jenkins
2014-09-24 19:04:24 -07:00
Kohsuke Kawaguchi 201b035cfc Updated to reflect the signature change around role checking in remoting 2014-09-24 09:43:31 -07:00
Jesse Glick 253943e13e [JENKINS-5756] Removing workarounds for HotSpot bug.
https://bugs.openjdk.java.net/browse/JDK-6933067 claims to be fixed as of Java 6, our baseline.
2014-09-24 09:32:50 -04:00
Kohsuke Kawaguchi ffb5b65093 Switched from annotation based scheme to a function based scheme. 2014-09-23 19:12:43 -07:00
Kohsuke Kawaguchi 140d929516 Fixed the computation of effective FilePathFilter.
If a @SlaveToMaster Callable gets sent to the master, and if inside its call() method the code directly/indirectly performs file system access (for example on files and directories that it didn't receive as parameters), that is not meant to be the subject of the filter check.

Rather, the check is meant for FilePath that the other side sends to us, when it points to a local file.

So it makes more sense to compute the effective FilePathFilter during the deserialization, as opposed to doing so when the actual operation is attempted.

Various FileCallable impls in FilePath fits this pattern, as it drags outer FilePath instance with itself. In addition, this change addresses other situations correctly, where FilePath is used as arguments and return values of other Callables, such as the following:

FilePath f = channel.call(new SlaveWillDoSomeComputationAndGiveMeTheResultAsFile());
f.copyTo(build.getRootDir().child("data.xml"))

"f.copyTo" happens in the context of Channel.current()==null, but we need to check that 'f' is legit and not something like
new FilePath(new File("/etc/shadow"))
2014-09-23 14:53:31 -07:00