* Add some tests to current behaviour of getLog method
* getLog(maxLines) reads only last maxLines lines now
It should speed up and reduce memory consumption for some plugins (i.e.
Email-ext Plugin).
Also now this method could be used to get last lines of build output in efficient manner.
* Fix issues from code review
- 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
* 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
* [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
Without it version of optional dependencies is set to "X.Y;resolution:=optional" which causes problems when using hudson.util.VersionNumber comparison methods.
* 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.
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 '>'
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.
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.
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.