- switched to KxmlDriver (needed for xml 1.1 support)
- updated to create xml v1.1 headers
- updated test to use KXml2Driver explicitly
- updated unit tests to support xml v1.1
* 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.
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)
- coding style was not matching the rest of Jenkins
- IOUtils.closeQuietly is a lot more concise way of achieving the same
thing.
- AtomicFileWriter.abort() does close, so no need to close it one more
time.
To be really correct, the crumb API call should be using the encoding specified in the HTTP response header, but doing so involves various header parsing, which is cumbersome.
Since we know Jenkins always serve the API call in UTF-8 encoding, here I'm baking that assumption in.
Honor $JENKINS_HOME (just like we used to do $HUDSON_HOME)
We still fall back to $HUDSON_HOME every step of the way
for maximum backward compatibility.
I wasn't initially planning to do this for the first version,
but working on native packages made me think we should deliver this.
HUDSON_HOME URL, then include Authorization header in Hudson http requests).
Also moved Functions.isUnitTest to Main.isUnitTest, to remove dependency on
winstone.jar for running hudson.Main (Main uses EnvVars which checks isUnitTest
flag.. in Functions which uses servlet classes).
Updated http://wiki.hudson-ci.org/display/HUDSON/Monitoring+external+jobs
with info about required jars and authentication.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@21479 71c3de6d-444a-0410-be80-ed276b4c234a