Skip to content
Permalink
Browse files
Merge branch 'master' into JENKINS-21969
  • Loading branch information
christ66 committed Feb 28, 2014
2 parents 84e8d01 + 00d2717 commit ae5a3cb3620b21daf2572b570312efabbaeed046
Showing with 577 additions and 291 deletions.
  1. +0 −59 .idea/compiler.xml
  2. +0 −12 .idea/encodings.xml
  3. +0 −10 .idea/groovyc.xml
  4. +31 −10 changelog.html
  5. +1 −1 cli/pom.xml
  6. +1 −1 core/pom.xml
  7. +5 −15 core/src/main/java/hudson/ClassicPluginStrategy.java
  8. +10 −9 core/src/main/java/hudson/FilePath.java
  9. +5 −16 core/src/main/java/hudson/PluginManager.java
  10. +2 −2 core/src/main/java/hudson/cli/ConsoleCommand.java
  11. +13 −20 core/src/main/java/hudson/model/AbstractItem.java
  12. +14 −14 core/src/main/java/hudson/model/DirectoryBrowserSupport.java
  13. +1 −1 core/src/main/java/hudson/model/DownloadService.java
  14. +1 −1 core/src/main/java/hudson/model/Job.java
  15. +16 −12 core/src/main/java/hudson/model/ListView.java
  16. +15 −14 core/src/main/java/hudson/model/Queue.java
  17. +8 −2 core/src/main/java/hudson/model/Run.java
  18. +1 −1 core/src/main/java/hudson/model/UpdateSite.java
  19. +7 −3 core/src/main/java/hudson/model/User.java
  20. +1 −0 core/src/main/java/hudson/model/View.java
  21. +3 −2 core/src/main/java/hudson/model/queue/ScheduleResult.java
  22. +1 −1 core/src/main/java/hudson/slaves/SlaveComputer.java
  23. +3 −0 core/src/main/java/hudson/util/IOUtils.java
  24. +1 −1 core/src/main/java/hudson/util/ProcessTree.java
  25. +5 −5 core/src/main/java/hudson/util/RunList.java
  26. +1 −1 core/src/main/java/hudson/util/TextFile.java
  27. +91 −15 core/src/main/java/jenkins/ClassLoaderReflectionToolkit.java
  28. +1 −1 core/src/main/java/jenkins/diagnosis/HsErrPidList.java
  29. +0 −2 core/src/main/java/jenkins/model/Jenkins.java
  30. +1 −1 core/src/main/java/jenkins/security/DefaultConfidentialStore.java
  31. +39 −5 core/src/main/java/jenkins/util/VirtualFile.java
  32. +25 −0 core/src/main/resources/META-INF/upgrade/IOUtils.hint
  33. +2 −2 core/src/main/resources/hudson/model/AbstractBuild/tasks_zh_CN.properties
  34. +1 −1 core/src/main/resources/hudson/model/BooleanParameterDefinition/config.jelly
  35. +1 −1 core/src/main/resources/hudson/model/ChoiceParameterDefinition/config.jelly
  36. +1 −1 core/src/main/resources/hudson/model/FileParameterDefinition/config.jelly
  37. +1 −1 core/src/main/resources/hudson/model/PasswordParameterDefinition/config.jelly
  38. +1 −1 core/src/main/resources/hudson/model/RunParameterDefinition/config.jelly
  39. +1 −1 core/src/main/resources/hudson/model/StringParameterDefinition/config.jelly
  40. +1 −1 core/src/main/resources/hudson/model/TextParameterDefinition/config.jelly
  41. +4 −0 core/src/test/java/hudson/util/ProcessTreeTest.java
  42. +95 −0 core/src/test/java/hudson/util/RunListTest.java
  43. +1 −1 core/src/test/java/jenkins/RemotingJarSignatureTest.java
  44. +6 −0 debian/debian/changelog
  45. +4 −4 plugins/pom.xml
  46. +1 −2 pom.xml
  47. +1 −1 test/pom.xml
  48. +9 −1 test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java
  49. +9 −1 test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
  50. +0 −1 test/src/test/java/hudson/model/ListViewTest.java
  51. +72 −23 test/src/test/java/hudson/model/QueueTest.java
  52. +4 −3 test/src/test/java/hudson/model/UpdateCenterTest.java
  53. +2 −2 test/src/test/java/hudson/model/UpdateSiteTest.java
  54. +11 −0 test/src/test/java/hudson/model/UserTest.java
  55. +39 −4 test/src/test/java/hudson/tasks/ArtifactArchiverTest.java
  56. +7 −2 war/pom.xml
  57. BIN war/src/main/webapp/images/16x16/gear2.gif
  58. BIN war/src/main/webapp/images/16x16/gear2.png

This file was deleted.

This file was deleted.

This file was deleted.

@@ -55,14 +55,39 @@
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=rfe>
Split the “raw HTML” markup formatter out of core into a bundled plugin.
<li class=bug>
Archiving of symlinks as artifacts did not work in some cases.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-21958">issue 21958</a>)
<li class=bug>
Slow rendering of directories with many entries in remote workspaces.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-21780">issue 21780</a>)
</ul>
</div><!--=TRUNK-END=-->

<!-- these changes are controlled by the release process. DO NOT MODIFY -->
<div id="rc" style="display:none;"><!--=BEGIN=-->
<h3><a name=v1.552>What's new in 1.552</a> <!--=DATE=--></h3>
<h3><a name=v1.553>What's new in 1.553</a> <!--=DATE=--></h3>
<ul class=image>
<li class=bug>
Build history widget only showed the last day of builds.
(Due to JENKINS-20892, even with this fix at most 20 builds are shown.)
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-21159">issue 21159</a>)
<li class=bug>
Random class loading error mostly known to affect static analysis plugins.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-12124">issue 12124</a>)
<li class=bug>
After restarting Jenkins, users known only from changelogs could be shown as <code>First Last _first.last@some.org_</code>, breaking mail delivery.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-16332">issue 16332</a>)
<li class=bug>
CLI <code>build -s -v</code> command caused 100% CPU usage on the master.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-20965">issue 20965</a>)
<li class=rfe>
Slave started from Java Web Start can now install itself as a systemd service.
<li class=rfe>
Split the “raw HTML” markup formatter out of core into a bundled plugin.
</ul>
</div><!--=END=-->
<h3><a name=v1.552>What's new in 1.552</a> (2014/02/24)</h3>
<ul class=image>
<li class=bug>
Fixed handling of default JENKINS_HOME when storing CLI credentials
@@ -76,11 +101,7 @@ <h3><a name=v1.552>What's new in 1.552</a> <!--=DATE=--></h3>
<li class=bug>
Expensive symlink-related calls on Windows can be simplified.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-20534">issue 20534</a>)
<li class=bug>
Slow rendering of directories with many entries in remote workspaces.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-21780">issue 21780</a>)
</ul>
</div><!--=END=-->
<h3><a name=v1.551>What's new in 1.551</a> (2014/02/14)</h3>
<ul class=image>
<li class='major bug'>
@@ -236,12 +257,12 @@ <h3><a name=v1.544>What's new in 1.544</a> (2013/12/15)</h3>
<li class=bug>
JavaScript errors when navigating away from a page with a build timeline widget while the timeline is loading.
(<a href="https://github.com/jenkinsci/jenkins/pull/1041">pull request 1041</a>)
</ul>
<h3><a name=v1.543>What's new in 1.543</a> (2013/12/10)</h3>
<ul class=image>
<li class=bug>
Fixed a possible dead lock problem in deleting projects.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-19446">issue 19446</a>)
</ul>
<h3><a name=v1.543>What's new in 1.543</a> (2013/12/10)</h3>
<ul class=image>
<li class=bug>
HTML metacharacters not escaped in log messages.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-20800">issue 20800</a>)
@@ -5,7 +5,7 @@
<parent>
<artifactId>pom</artifactId>
<groupId>org.jenkins-ci.main</groupId>
<version>1.553-SNAPSHOT</version>
<version>1.554-SNAPSHOT</version>
</parent>

<artifactId>cli</artifactId>
@@ -29,7 +29,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>pom</artifactId>
<version>1.553-SNAPSHOT</version>
<version>1.554-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@@ -56,7 +56,6 @@
import java.io.FilenameFilter;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
@@ -72,7 +71,6 @@
import java.util.logging.Logger;

public class ClassicPluginStrategy implements PluginStrategy {
private final ClassLoaderReflectionToolkit clt = new ClassLoaderReflectionToolkit();

/**
* Filter for jar files.
@@ -569,10 +567,10 @@ public DependencyClassLoader(ClassLoader parent, File archive, List<Dependency>
if (PluginManager.FAST_LOOKUP) {
for (PluginWrapper pw : getTransitiveDependencies()) {
try {
Class c = clt.findLoadedClass(pw.classLoader,name);
Class<?> c = ClassLoaderReflectionToolkit._findLoadedClass(pw.classLoader, name);
if (c!=null) return c;
return clt.findClass(pw.classLoader,name);
} catch (InvocationTargetException e) {
return ClassLoaderReflectionToolkit._findClass(pw.classLoader, name);
} catch (ClassNotFoundException e) {
//not found. try next
}
}
@@ -596,15 +594,11 @@ public DependencyClassLoader(ClassLoader parent, File archive, List<Dependency>
HashSet<URL> result = new HashSet<URL>();

if (PluginManager.FAST_LOOKUP) {
try {
for (PluginWrapper pw : getTransitiveDependencies()) {
Enumeration<URL> urls = clt.findResources(pw.classLoader, name);
Enumeration<URL> urls = ClassLoaderReflectionToolkit._findResources(pw.classLoader, name);
while (urls != null && urls.hasMoreElements())
result.add(urls.nextElement());
}
} catch (InvocationTargetException e) {
throw new Error(e);
}
} else {
for (Dependency dep : dependencies) {
PluginWrapper p = pluginManager.getPlugin(dep.shortName);
@@ -622,14 +616,10 @@ public DependencyClassLoader(ClassLoader parent, File archive, List<Dependency>
@Override
protected URL findResource(String name) {
if (PluginManager.FAST_LOOKUP) {
try {
for (PluginWrapper pw : getTransitiveDependencies()) {
URL url = clt.findResource(pw.classLoader,name);
URL url = ClassLoaderReflectionToolkit._findResource(pw.classLoader, name);
if (url!=null) return url;
}
} catch (InvocationTargetException e) {
throw new Error(e);
}
} else {
for (Dependency dep : dependencies) {
PluginWrapper p = pluginManager.getPlugin(dep.shortName);
@@ -665,7 +665,7 @@ public Void invoke(File dir, VirtualChannel channel) throws IOException {
private static final long serialVersionUID = 1L;
});
} finally {
IOUtils.closeQuietly(_in);
org.apache.commons.io.IOUtils.closeQuietly(_in);
}
}

@@ -815,7 +815,7 @@ public void copyFrom(URL url) throws IOException, InterruptedException {
public void copyFrom(InputStream in) throws IOException, InterruptedException {
OutputStream os = write();
try {
IOUtils.copy(in, os);
org.apache.commons.io.IOUtils.copy(in, os);
} finally {
os.close();
}
@@ -846,7 +846,7 @@ public void copyFrom(FileItem file) throws IOException, InterruptedException {
InputStream i = file.getInputStream();
OutputStream o = write();
try {
IOUtils.copy(i,o);
org.apache.commons.io.IOUtils.copy(i,o);
} finally {
try {
o.close();
@@ -1640,8 +1640,8 @@ public Void call() throws IOException {
Util.copyStream(fis,p.getOut());
return null;
} finally {
IOUtils.closeQuietly(fis);
IOUtils.closeQuietly(p.getOut());
org.apache.commons.io.IOUtils.closeQuietly(fis);
org.apache.commons.io.IOUtils.closeQuietly(p.getOut());
}
}
});
@@ -1655,7 +1655,7 @@ public Void call() throws IOException {
public String readToString() throws IOException {
InputStream in = read();
try {
return IOUtils.toString(in);
return org.apache.commons.io.IOUtils.toString(in);
} finally {
in.close();
}
@@ -1815,8 +1815,8 @@ public Void invoke(File f, VirtualChannel channel) throws IOException {
Util.copyStream(fis,out);
return null;
} finally {
IOUtils.closeQuietly(fis);
IOUtils.closeQuietly(out);
org.apache.commons.io.IOUtils.closeQuietly(fis);
org.apache.commons.io.IOUtils.closeQuietly(out);
}
}
});
@@ -1933,7 +1933,7 @@ public Integer invoke(File base, VirtualChannel channel) throws IOException {
@Override public void visit(File f, String relativePath) throws IOException {
if (f.isFile()) {
File target = new File(dest, relativePath);
target.getParentFile().mkdirs();
IOUtils.mkdirs(target.getParentFile());
Util.copyFile(f, target);
count.incrementAndGet();
}
@@ -1943,6 +1943,7 @@ public Integer invoke(File base, VirtualChannel channel) throws IOException {
}
@Override public void visitSymlink(File link, String target, String relativePath) throws IOException {
try {
IOUtils.mkdirs(new File(dest, relativePath).getParentFile());
Util.createSymlink(dest, target, relativePath, TaskListener.NULL);
} catch (InterruptedException x) {
throw (IOException) new IOException(x.toString()).initCause(x);
@@ -82,7 +82,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.lang.ref.WeakReference;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
import java.util.ArrayList;
@@ -941,8 +940,6 @@ public HttpResponse doInstallNecessaryPlugins(StaplerRequest req) throws IOExcep
*/
private ConcurrentMap<String, WeakReference<Class>> generatedClasses = new ConcurrentHashMap<String, WeakReference<Class>>();

private ClassLoaderReflectionToolkit clt = new ClassLoaderReflectionToolkit();

public UberClassLoader() {
super(PluginManager.class.getClassLoader());
}
@@ -963,11 +960,11 @@ public void addNamedClass(String className, Class c) {
if (FAST_LOOKUP) {
for (PluginWrapper p : activePlugins) {
try {
Class c = clt.findLoadedClass(p.classLoader,name);
Class<?> c = ClassLoaderReflectionToolkit._findLoadedClass(p.classLoader, name);
if (c!=null) return c;
// calling findClass twice appears to cause LinkageError: duplicate class def
return clt.findClass(p.classLoader,name);
} catch (InvocationTargetException e) {
return ClassLoaderReflectionToolkit._findClass(p.classLoader, name);
} catch (ClassNotFoundException e) {
//not found. try next
}
}
@@ -987,15 +984,11 @@ public void addNamedClass(String className, Class c) {
@Override
protected URL findResource(String name) {
if (FAST_LOOKUP) {
try {
for (PluginWrapper p : activePlugins) {
URL url = clt.findResource(p.classLoader,name);
URL url = ClassLoaderReflectionToolkit._findResource(p.classLoader, name);
if(url!=null)
return url;
}
} catch (InvocationTargetException e) {
throw new Error(e);
}
} else {
for (PluginWrapper p : activePlugins) {
URL url = p.classLoader.getResource(name);
@@ -1010,13 +1003,9 @@ protected URL findResource(String name) {
protected Enumeration<URL> findResources(String name) throws IOException {
List<URL> resources = new ArrayList<URL>();
if (FAST_LOOKUP) {
try {
for (PluginWrapper p : activePlugins) {
resources.addAll(Collections.list(clt.findResources(p.classLoader, name)));
resources.addAll(Collections.list(ClassLoaderReflectionToolkit._findResources(p.classLoader, name)));
}
} catch (InvocationTargetException e) {
throw new Error(e);
}
} else {
for (PluginWrapper p : activePlugins) {
resources.addAll(Collections.list(p.classLoader.getResources(name)));
@@ -77,7 +77,7 @@ protected int run() throws Exception {
} else {
InputStream in = run.getLogInputStream();
IOUtils.skip(in,pos);
IOUtils.copy(new InputStreamReader(in,run.getCharset()),w);
org.apache.commons.io.IOUtils.copy(new InputStreamReader(in,run.getCharset()),w);
}
} finally {
w.flush(); // this pointless flush needed to work around SSHD-154
@@ -134,7 +134,7 @@ long get() {

return rb.get();
} finally {
IOUtils.closeQuietly(in);
org.apache.commons.io.IOUtils.closeQuietly(in);
}
}

0 comments on commit ae5a3cb

Please sign in to comment.