Skip to content

Commit

Permalink
Merge branch 'master' into update-forms
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Dec 14, 2021
2 parents adc5587 + cd3b1f7 commit 96ba6a7
Show file tree
Hide file tree
Showing 227 changed files with 3,071 additions and 1,622 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
root = true

[*.{jelly, js, less, css, hbs}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
env:
GITHUB_AUTH: github-actions:${{ secrets.GITHUB_TOKEN }}
- name: Upload Changelog YAML
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v2.3.0
with:
name: changelog.yaml
path: changelog.yaml
Expand Down
32 changes: 30 additions & 2 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ THE SOFTWARE.


<properties>
<asm.version>9.2</asm.version>
<slf4jVersion>1.7.32</slf4jVersion>
<stapler.version>1593.v0e838714faae</stapler.version>
<groovy.version>2.4.12</groovy.version>
Expand Down Expand Up @@ -95,8 +96,10 @@ THE SOFTWARE.
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<artifactId>guice-bom</artifactId>
<version>5.0.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<!-- SLF4J used in maven-plugin and core -->
Expand Down Expand Up @@ -188,10 +191,35 @@ THE SOFTWARE.
<artifactId>jbcrypt</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>${asm.version}</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-analysis</artifactId>
<version>${asm.version}</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>${asm.version}</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId>
<version>${asm.version}</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-util</artifactId>
<version>${asm.version}</version>
</dependency>
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-posix</artifactId>
<version>3.1.13</version>
<version>3.1.14</version>
</dependency>
<dependency>
<groupId>org.kohsuke</groupId>
Expand Down
12 changes: 11 additions & 1 deletion cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
<description>Command line interface for Jenkins</description>
<url>https://github.com/jenkinsci/jenkins</url>

<properties>
<mina-sshd.version>2.8.0</mina-sshd.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
Expand Down Expand Up @@ -68,7 +72,13 @@
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-core</artifactId>
<version>2.7.0</version>
<version>${mina-sshd.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-common</artifactId>
<version>${mina-sshd.version}</version>
<optional>true</optional>
</dependency>
<!-- ed25519 algorithm, see JENKINS-45318 -->
Expand Down
1 change: 0 additions & 1 deletion cli/src/main/java/hudson/cli/FullDuplexHttpStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public InputStream getInputStream() {
* A way to upload data to the server.
* You will need to write to this and {@link OutputStream#flush} it to finish establishing a connection.
*/
@SuppressFBWarnings("EI_EXPOSE_REP")
public OutputStream getOutputStream() {
return output;
}
Expand Down
4 changes: 2 additions & 2 deletions cli/src/main/java/hudson/cli/SSHCLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
import org.apache.sshd.client.keyverifier.ServerKeyVerifier;
import org.apache.sshd.client.session.ClientSession;
import org.apache.sshd.common.future.WaitableFuture;
import org.apache.sshd.common.util.io.NoCloseInputStream;
import org.apache.sshd.common.util.io.NoCloseOutputStream;
import org.apache.sshd.common.util.io.input.NoCloseInputStream;
import org.apache.sshd.common.util.io.output.NoCloseOutputStream;
import org.apache.sshd.common.util.security.SecurityUtils;

/**
Expand Down
22 changes: 20 additions & 2 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ THE SOFTWARE.
<staplerFork>true</staplerFork>
<hamcrest.version>2.2</hamcrest.version>
<xmlunit.version>2.8.3</xmlunit.version>
<!-- TODO: JENKINS-36716 - Switch to Medium once SpotBugs is cleaned up, 929 issues on September 26, 2021 -->
<spotbugs.threshold>High</spotbugs.threshold>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -106,6 +104,26 @@ THE SOFTWARE.
<groupId>com.github.jnr</groupId>
<artifactId>jnr-posix</artifactId>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-analysis</artifactId>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-util</artifactId>
</dependency>
<dependency>
<groupId>org.kohsuke.stapler</groupId>
<artifactId>stapler</artifactId>
Expand Down
33 changes: 19 additions & 14 deletions core/src/main/java/hudson/ClassicPluginStrategy.java
Original file line number Diff line number Diff line change
Expand Up @@ -285,27 +285,32 @@ protected ClassLoader createClassLoader(List<File> paths, ClassLoader parent) th
* Creates the classloader that can load all the specified jar files and delegate to the given parent.
*/
protected ClassLoader createClassLoader(List<File> paths, ClassLoader parent, Attributes atts) throws IOException {
if (atts != null) {
String usePluginFirstClassLoader = atts.getValue( "PluginFirstClassLoader" );
if (Boolean.parseBoolean( usePluginFirstClassLoader )) {
PluginFirstClassLoader classLoader = new PluginFirstClassLoader();
classLoader.setParentFirst( false );
classLoader.setParent( parent );
classLoader.addPathFiles( paths );
return classLoader;
}
}
boolean usePluginFirstClassLoader =
atts != null && Boolean.parseBoolean(atts.getValue("PluginFirstClassLoader"));

if (useAntClassLoader) {
AntClassLoader classLoader = new AntClassLoader(parent, true);
AntClassLoader classLoader;
if (usePluginFirstClassLoader) {
classLoader = new PluginFirstClassLoader();
classLoader.setParentFirst(false);
classLoader.setParent(parent);
} else {
classLoader = new AntClassLoader(parent, true);
}
classLoader.addPathFiles(paths);
return classLoader;
} else {
List<URL> urls = new ArrayList<>();
for (File path : paths) {
urls.add(path.toURI().toURL());
}
return new URLClassLoader2(urls.toArray(new URL[0]), parent);
URLClassLoader2 classLoader;
if (usePluginFirstClassLoader) {
classLoader = new PluginFirstClassLoader2(urls.toArray(new URL[0]), parent);
} else {
classLoader = new URLClassLoader2(urls.toArray(new URL[0]), parent);
}
return classLoader;
}
}

Expand Down Expand Up @@ -475,7 +480,7 @@ private static void parseClassPath(Manifest manifest, File archive, List<File> p
* Explodes the plugin into a directory, if necessary.
*/
private static void explode(File archive, File destDir) throws IOException {
destDir.mkdirs();
Files.createDirectories(Util.fileToPath(destDir));

// timestamp check
File explodeTime = new File(destDir,".timestamp2");
Expand Down Expand Up @@ -544,7 +549,7 @@ protected void zipDir(Resource dir, ZipOutputStream zOut, String vPath,
};
z.setProject(prj);
z.setTaskType("zip");
classesJar.getParentFile().mkdirs();
Files.createDirectories(Util.fileToPath(classesJar.getParentFile()));
z.setDestFile(classesJar);
z.add(mapper);
z.execute();
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/ExtensionFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ private void resolve(Class<?> c, Set<Class<?>> encountered) {
}
}
LOGGER.log(Level.FINER, "{0} looks OK", c);
} catch (Exception x) {
} catch (RuntimeException x) {
throw new LinkageError("Failed to resolve "+c, x);
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/ExtensionList.java
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ private void fireOnChangeListeners() {
for (ExtensionListListener listener : listeners) {
try {
listener.onChange();
} catch (Exception e) {
} catch (Throwable e) {
LOGGER.log(Level.SEVERE, "Error firing ExtensionListListener.onChange().", e);
}
}
Expand Down
Loading

0 comments on commit 96ba6a7

Please sign in to comment.