Commit Graph
577 Commits
Author SHA1 Message Date
Stephen Connolly 183fac8a63 [JENKINS-39404] Introduce an addOrReplaceAction method with dirty return type
- We cannot modify `replaceAction` to return the dirty flag, in fact most callers probably don't care... but if you do care, we now provide `addOrReplaceAction`
- Clarify the javadocs to reflect that these methods are not going to affect actions added by transient action factories
2016-11-02 09:16:42 +00:00
Stephen Connolly 65de34f7b9 [JENKINS-39404] Minimize non-changes affecting write to disk requirement 2016-11-01 15:36:33 +00:00
Stephen Connolly f03e6fd1ca [JENKINS-39404] Allow a more generic replaceActions 2016-11-01 13:29:56 +00:00
Stephen Connolly 1990e3d09a [FIXED JENKINS-39404] Restore symmetry by adding removeAction and removeActions methods to Actionable 2016-11-01 13:17:25 +00:00
Oleg Nenashev 7d886ce9fb [FIXED JENKINS-35967] - Make User#isIdOrFullnameAllowed() more robust against restricted usernames (#2413)
This change hardens username verification in user creation commands. See the issue to get rexamples.

https://issues.jenkins-ci.org/browse/JENKINS-35967
2016-10-15 16:57:02 -07:00
Oliver Gondža 7f6f495f86 Avoid deprecated findbugs annotations (#2144)
* Avoid deprecated findbugs annotations

* One more forgotten annotation
2016-10-15 12:53:56 -07:00
Oliver Gondža 11af7d0bc1 [FIXED JENKINS-37616] Make Cloud.PROVISION independent from Jenkins.ADMINISTER (#2521) 2016-08-27 22:23:08 +02:00
dbroady1 f4edf91782 [JENKINS-29956] Test Windows junctions before Java 7 symlink (#1787)
* Test Windows junctions before Java 7 symlink

Apparently Java 7 (and later) do not count Windows junctions as
symlinks.  When you drill down into the BasicFileAttributes structure,
reparse points are only counted under isOther.  So, since we already
have code that properly detects Windows Junctions, let's use that first
and then fallback to the Java 7 code.

* Add comment for change & link bug.

* Add test case

* Switch to Functions.isWindows().

* Use non-deprecated APIs for tmp file/dir mgmt

* Add better debugging.

* Allow spaces in junction name & dir name.

To do that, it was easier to use ProcessBuilder vs building up the correct
string in code to send to cmd.exe.

Also, I'll note that according to http://ss64.com/nt/syntax-internal.html,
mklink is in internal cmd.exe command.  So, it must be invoked through
"cmd.exe /c" for it to work.

* Remove comment mentioning bug number.

* Remove debugging output, per Baptiste's request

* Add newline at end of file.

* Make sure that the junction was removed.

* Use assertEquals to show retcode of Process.waitFor.

* Fix compilation errors by importing functions
2016-08-22 15:21:33 +02:00
Oleg Nenashev 96c97860b0 [FIXED JENKINS-37332] - Prevent File descriptor leaks when reading manifests from JARs (#2516)
* [JENKINS-37332] - Improve diagnostics of non-closed streams during reading of the manifests in PluginManager

* [JENKINS-37332] - Leakless processing of JarUrlConnection during Manifest parsing

* [JENKINS-37332] - Also implement leak-safe method for retrieving file modification date

* [JENKINS-37332] - Add spotcheck methods for manifest file access + Javadoc

* [JENKINS-37332] - Also test multi-line and empty attributes in the test
2016-08-21 00:00:41 +02:00
Stephen Connolly 136aeb86a4 [JENKINS-37189] Refactor to make more testable
- A pure unit tests will suffice
2016-08-09 11:07:53 +01:00
Alvaro Lobato 5fdf33ba9b [JENKINS-20187] - Handle growing files when creating a tar file. (#2419)
* [JENKINS-20187] - Handle growing files when creating a tar file.

* - Introduce try-with-resources
- Remove exception login
- Throw new exception with filename and addSuppresed

* Address jglick comments
2016-07-02 18:21:58 +02:00
Stephen Connolly 5a0d7ece6a Merge pull request #2427 from stephenc/jenkins-36280
[FIXED JENKINS-36280] Enable DescriptorVisibilityFilter for Slave's C…
2016-07-01 17:06:45 +01:00
Michal Slusarczyk fa1c03b0d8 [JENKINS-21486] Fixing optional dependency version resolution. (#2421)
Without it version of optional dependencies is set to "X.Y;resolution:=optional" which causes problems when using hudson.util.VersionNumber comparison methods.
2016-06-29 20:02:28 +02:00
Stephen Connolly 53adb022e4 [FIXED JENKINS-36280] Enable DescriptorVisibilityFilter for Slave's ComputerLauncher, RetentionStrategy and NodeProperty 2016-06-28 17:07:00 +01:00
Oleg Nenashev 200a0beb74 [JENKINS-33600] - User#isIdOrFullnameAllowed() should be tolerant against null parameters (#2406)
* [JENKINS-33600] - User#isIdOrFullnameAllowed() should be tolerant against null parameters

* [JENKINS-33600] - Add the follow-up TODO
2016-06-16 13:21:04 +02:00
peppelan 15ce24ae4d [JENKINS-35198] - DelegatingComputerLauncher should accept child classes in its hooks (#2384)
* JENKINS-35198 Add failing test for clear identification of the issue and future regression test

* JENKINS-35198 Fix DelegatingComputerLauncher logic for filtering out subclasses as possible delegates

this logic is by default, and subclasses can still allow the selection of other DelegatingComputerLauncher instances as delegates.
2016-05-29 14:38:32 +04:00
Vincent Latombe 0c16c8576b [JENKINS-23507] Make FilePath.installIfNecessaryFrom follow redirects (#2331) 2016-05-13 12:36:45 +02:00
Jesse Glick c2d0a5778e Merge commit '97a0fa0d036b9d3873c9b269123020a42e7ee3e9' into security-master 2016-05-11 12:07:25 -04:00
Daniel Beck 240405dfc3 Merge pull request #2026 from pjdarton/fix_jenkins_15331
[FIX JENKINS-15331] Windows file locking workaround
2016-05-04 01:32:27 +02:00
Jesse Glick 888ca85784 Merge branch 'security-stable-1.651' into security-master 2016-04-28 17:38:40 -04:00
Jesse Glick c08e0bf79d Merge branch 'security-stable-1.642' into security-stable-1.651 2016-04-28 17:38:13 -04:00
Jesse Glick 11120802c1 Merge branch 'security-stable-1.625' into security-stable-1.642 2016-04-28 17:37:52 -04:00
Jesse Glick c88268d870 Merge branch 'security-stable-1.609' into security-stable-1.625 2016-04-28 17:36:42 -04:00
Daniel Beck 38f8b43e8d [SECURITY-276] Add more tests for relative URLs 2016-04-28 00:45:43 +02:00
Daniel Beck e6efae7d0d [SECURITY-276] Better method name, add tests 2016-04-27 13:51:10 +02:00
Daniel Beck 1fe9cf7b7a Merge branch '2.0' of github.com:jenkinsci/jenkins 2016-04-07 11:52:44 +02:00
Craig Rodrigues 0611d0788a Remove use of '<' and '>' which cause javadoc errors
Tested with Java 8 and "mvn javadoc:test-javadoc".  Eliminates errors such as:

    [ERROR] java/hudson/os/DCOMSandbox.java:18: error: bad use of '>'
2016-04-06 15:52:04 -07:00
Craig Rodrigues e0daa5c4e8 Fix href links
Eliminates errors with Java 8 and "mvn javadoc:test-javadoc" such as:

    [ERROR] jenkins/core/src/test/java/hudson/os/DCOMSandbox.java:18: error: bad use of '>'
2016-04-06 15:52:04 -07:00
Daniel Beck d182cdf223 Merge branch 'master' of github.com:jenkinsci/jenkins into 2.0 2016-04-06 19:18:44 +02:00
Baptiste Mathus 2c9adc9965 Merge pull request #2221 from rodrigc/java8_fix1
Do not use '_' as an identifier
2016-04-06 15:39:40 +02:00
Craig Rodrigues 552d8a6b95 Fix href tags
Eliminates errors with Java 8 and "mvn javadoc:test-javadoc" such as:

    [ERROR] jenkins/core/src/test/java/hudson/model/ItemsTest.java:12: error: unknown attribute: hef
    [ERROR] * @author: <a hef="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
2016-04-05 12:35:30 -07:00
Craig Rodrigues 84fa59a87c Do not use '_' as an identifier
Eliminates Java 8 warnings:
  (use of '_' as an identifier might not be supported in releases after Java SE 8)
2016-04-05 11:03:08 -07:00
Emilio Escobar f6db6670a8 [JENKINS-28790] Baptiste comments fixed
(cherry picked from commit 7fb1ac9d9f)
2016-03-30 11:58:21 +02:00
Emilio Escobar 0782aa567b [JENKINS-28790] solved the issue masked parameters not masked in windows system. toWindowsCommand joins all args in one, missing masked.
(cherry picked from commit b9a72bcd96)
2016-03-30 11:58:21 +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
Oliver Gondža 8ba59197e4 Merge pull request #2049 from pjanouse/JENKINS-33037
[FIXED JENKINS-33037] Fixed malformed ranges in RangeSet.fromString()
2016-03-16 13:26:17 +01:00
Ing. Pavel Janousek c1621a2bd0 [JENKINS-33037] Fixed malformed ranges in RangeSet.fromString()
Fix for rejecting malformed ranges in
hudson.model.Fingerprint.RangeSet.fromString(...)
2016-03-10 16:35:58 +01:00
Daniel Beck 074890c093 Merge pull request #2015 from escoem/JENKINS-28790
[FIX JENKINS-28790] Masked parameters are now hidden on Windows
2016-03-08 16:28:17 +01:00
Sam Van Oort e136952d2a Remove remainder of ConcurrentHashMap testcase 2016-03-02 10:53:03 -05:00
Sam Van Oort f3a9dd5bb0 Remove broken XStream2 test of legacy custom ConcurrentHashMapSerialiation
This one requires some explanation: there is a bug
As custom serialization of ConcurrentHashMaps was removed circa 2010
(see eb51d46d56)

We can assume that testing conversion is no longer a high priority.
Root cause appears to be a subtle change in the XStream attribute access behavior when run under JDK8 only.
This appears to be the only case that triggers it.
2016-02-29 14:36:39 -05:00
Daniel Beck 3624f70169 Merge branch 'master' of github.com:jenkinsci/jenkins into 2.0
Conflicts:
	cli/pom.xml
	core/pom.xml
	pom.xml
	test/pom.xml
	test/src/test/java/hudson/cli/CreateNodeCommandTest.java
	test/src/test/java/hudson/cli/DeleteNodeCommandTest.java
	test/src/test/java/hudson/cli/GetNodeCommandTest.java
	test/src/test/java/hudson/cli/OnlineNodeCommandTest.java
	test/src/test/java/hudson/cli/UpdateNodeCommandTest.java
	war/pom.xml
2016-02-22 13:22:37 +01:00
Peter Darton f1e16504e9 ...and another missing import (same reason). 2016-02-12 16:57:01 +00:00
Peter Darton 4a6e998360 Fix missing import (caused by failed merge.) 2016-02-12 16:52:02 +00:00
Peter Darton 310c674762 FIXED JENKINS-15331 by changing Util.deleteContentsRecursive, Util.deleteFile and Util.deleteRecursive so that they can retry failed deletions.
The number of deletion attempts and the time it waits between deletes are configurable via system properties (like hudson.Util.noSymlink etc).
Util.DELETION_MAX is set by -Dhudson.Util.deletionMax.  Default is 3 attempts.
Util.WAIT_BETWEEN_DELETION_RETRIES is set by -Dhudson.Util.deletionRetryWait.  Defaults is 100 milliseconds.
Util.GC_AFTER_FAILED_DELETE is set by -Dhudson.Util.performGCOnFailedDelete.  Default is false.

Added unit-tests for new functionality.
2016-02-12 16:22:35 +00:00
Ing. Pavel Janousek d5725e6d18 [JENKINS-32273] Unified an issue handling in CLI
Re-factored all existed CLI code to follow the new proposed scheme for
raising an exception if issue occurs, handling and reporting it.
Unified CLIRegisterer as well.
Fixed unit tests to follow the new scheme.
2016-02-12 16:25:20 +01:00
Emilio Escobar 7fb1ac9d9f [JENKINS-28790] Baptiste comments fixed 2016-02-08 11:02:54 -06:00
Emilio Escobar b9a72bcd96 [JENKINS-28790] solved the issue masked parameters not masked in windows system. toWindowsCommand joins all args in one, missing masked. 2016-02-05 15:35:18 +01:00
tfennelly 036a8e94ed [FIX JENKINS-9598] Add plugin selection wizard on first launch
Also ... unbundling of plugins from Jenkins core.
2016-01-20 10:54:32 +00:00
Jesse Glick e61621c5b6 Skip the test if the tar or unzip commands are not available.
https://ci.jenkins-ci.org/job/jenkins_main_trunk/4400/testReport/junit/hudson.util.io/TarArchiverTest/permission/
2016-01-08 12:59:22 -05: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