Skip to content
20 changes: 17 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-pom</artifactId>
<version>11.2958.v63511c4c1160</version>
<version>12.3140.v667559b_d0470</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -40,7 +40,7 @@
</scm>

<properties>
<revision>6</revision>
<revision>7</revision>
<changelist>999999-SNAPSHOT</changelist>

<module.name>${project.groupId}.plugin.util.api</module.name>
Expand All @@ -49,7 +49,7 @@
<j2html.version>1.4.0</j2html.version>
<streamex.version>0.8.4</streamex.version>
<testcontainers.version>2.0.4</testcontainers.version>
<codingstyle.library.version>5.26.0</codingstyle.library.version>
<codingstyle.library.version>6.6.0</codingstyle.library.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -320,6 +320,20 @@
<classQualifiedName>.*</classQualifiedName>
<justification>Use ArrayList rather than List</justification>
</item>
<item>
<ignore>true</ignore>
<regex>true</regex>
<code>java.annotation.*</code>
<annotation>@edu.hm.hafner.util.SuppressMutation.*</annotation>
<justification>PitMute Annotations are not relevant in API</justification>
</item>
<item>
<ignore>true</ignore>
<regex>true</regex>
<code>java.annotation.*</code>
<classQualifiedName>edu.hm.hafner.util.SuppressMutation.*</classQualifiedName>
<justification>PitMute Annotations are not relevant in API</justification>
</item>
</differences>
</revapi.differences>
<revapi.filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public String[] invoke(final File workspace, final VirtualChannel channel) {
*
* @return the file names of all found files
*/
public String[] find(final File workspace) {
String[] find(final File workspace) {
try {
var fileSet = new FileSet();
var antProject = new Project();
Expand Down
15 changes: 12 additions & 3 deletions src/test/java/io/jenkins/plugins/util/IntegrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -746,9 +746,18 @@

private void setAccessModeOnWindows(final String path, final String command, final String accessMode) {
try {
var process = Runtime.getRuntime()
.exec("icacls \"" + path + "\" " + command + " *S-1-1-0:" + accessMode);
process.waitFor();
var process = new ProcessBuilder("icacls",

Check warning

Code scanning / CodeQL

Executing a command with a relative path Medium test

Command with a relative path 'icacls' is executed.
path, command, "*S-1-1-0:" + accessMode)
.redirectErrorStream(true)
.start();
var exitCode = process.waitFor();
if (exitCode != 0) {
String output;
try (var in = process.getInputStream()) {
output = new String(in.readAllBytes(), StandardCharsets.UTF_8);
}
throw new AssertionError("icacls failed with exit code " + exitCode + ": " + output);
}
}
catch (IOException | InterruptedException e) {
throw new AssertionError(e);
Expand Down
Loading