Skip to content

Commit cdc532f

Browse files
authored
Merge pull request #10 from CodeShield-Security/improve/psParsing
Improve/ps parsing
2 parents b5517d0 + 8c875e4 commit cdc532f

File tree

10 files changed

+108
-67
lines changed

10 files changed

+108
-67
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Log4jShell Bytecode Detector is an open source tool that helps identify if a jar
88

99
## 📝 How to run
1010

11-
1. Download the [jar file](https://github.com/CodeShield-Security/Log4JShell-Bytecode-Detector/releases/download/v0.4/Log4JDetector-0.4-jar-with-dependencies.jar) under releases.
11+
1. Download the [jar file](https://github.com/CodeShield-Security/Log4JShell-Bytecode-Detector/releases/download/v0.6.2/Log4JDetector-0.6.2-jar-with-dependencies.jar) under releases.
1212
2. Run `java -cp <PATH_TO_DOWNLOADED_JAR> de.codeshield.log4jshell.Log4JDetector <ABSOLUTE_PATH_TO_JAR_TO_CHECK>`
1313

1414

@@ -21,7 +21,7 @@ CVE-2021-44228 found in class file org/apache/logging/log4j/core/net/JndiManager
2121

2222
## 📝 How to run on a live server (no need to stop your running Java instances)
2323

24-
1. Download the [jar file](https://github.com/CodeShield-Security/Log4JShell-Bytecode-Detector/releases/download/v0.5/Log4JDetector-0.5-jar-with-dependencies.jar) under releases.
24+
1. Download the [jar file](https://github.com/CodeShield-Security/Log4JShell-Bytecode-Detector/releases/download/v0.6.2/Log4JDetector-0.6.2-jar-with-dependencies.jar) under releases.
2525
2. Run `java -cp <PATH_TO_DOWNLOADED_JAR> de.codeshield.log4jshell.Log4JProcessDetector`
2626
3. The jar searches the classpath of all running java processes for vulnerable log4j instances
2727

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<groupId>de.codeshield.log4shell</groupId>
99
<artifactId>Log4JDetector</artifactId>
10-
<version>0.6.1</version>
10+
<version>0.6.2</version>
1111

1212
<name>cve-2021-44228-detector</name>
1313
<url>https://codeshield.io</url>

src/main/java/de/codeshield/log4jshell/ClassDetector.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package de.codeshield.log4jshell;
22

33
import de.codeshield.log4jshell.data.VulnerableClassSHAData;
4+
import org.apache.commons.codec.digest.DigestUtils;
5+
46
import java.io.IOException;
57
import java.io.InputStream;
68
import java.util.Set;
7-
import org.apache.commons.codec.digest.DigestUtils;
89

910
public class ClassDetector {
1011

src/main/java/de/codeshield/log4jshell/Log4JDetector.java

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
package de.codeshield.log4jshell;
22

3+
import org.apache.commons.io.FileUtils;
4+
import org.apache.commons.io.filefilter.DirectoryFileFilter;
5+
import org.apache.commons.io.filefilter.RegexFileFilter;
6+
37
import java.io.BufferedInputStream;
48
import java.io.BufferedOutputStream;
59
import java.io.File;
@@ -10,9 +14,6 @@
1014
import java.util.Enumeration;
1115
import java.util.jar.JarEntry;
1216
import java.util.jar.JarFile;
13-
import org.apache.commons.io.FileUtils;
14-
import org.apache.commons.io.filefilter.DirectoryFileFilter;
15-
import org.apache.commons.io.filefilter.RegexFileFilter;
1617

1718
/**
1819
* A simple command line tool that scans a jar file for the CVE-2021-44228 vulnerability that
@@ -37,7 +38,8 @@ public static void main(String[] args) throws IOException {
3738
detector.run(args[0]);
3839
}
3940

40-
//Taken from https://stackoverflow.com/questions/981578/how-to-unzip-files-recursively-in-java/7108813#7108813
41+
// Taken from
42+
// https://stackoverflow.com/questions/981578/how-to-unzip-files-recursively-in-java/7108813#7108813
4143
public static String extractFolder(String zipFile) throws IOException {
4244
int buffer = 2048;
4345
File file = new File(zipFile);
@@ -89,30 +91,26 @@ public static String extractFolder(String zipFile) throws IOException {
8991

9092
public boolean run(String pathToJarFile) throws IOException {
9193
String folder = extractFolder(pathToJarFile);
92-
Collection<File> pomFiles = FileUtils.listFiles(
93-
new File(folder),
94-
new RegexFileFilter("^(pom.xml)"),
95-
DirectoryFileFilter.DIRECTORY
96-
);
94+
Collection<File> pomFiles =
95+
FileUtils.listFiles(
96+
new File(folder), new RegexFileFilter("^(pom.xml)"), DirectoryFileFilter.DIRECTORY);
9797
boolean isVulnerable = false;
9898
for (File pomFile : pomFiles) {
9999
try (FileInputStream is = new FileInputStream(pomFile)) {
100-
//Check if a pom file matches one of the pre-computed groupId:artifactId:version
100+
// Check if a pom file matches one of the pre-computed groupId:artifactId:version
101101
if (POMDetector.isVulnerablePOM(is)) {
102102
isVulnerable = true;
103103
System.err.println("CVE-2021-44228 found declared as dependency in " + pomFile);
104104
}
105105
}
106106
}
107-
Collection<File> classFiles = FileUtils.listFiles(
108-
new File(folder),
109-
new RegexFileFilter(".*.class$"),
110-
DirectoryFileFilter.DIRECTORY
111-
);
107+
Collection<File> classFiles =
108+
FileUtils.listFiles(
109+
new File(folder), new RegexFileFilter(".*.class$"), DirectoryFileFilter.DIRECTORY);
112110

113111
for (File classFile : classFiles) {
114112
try (FileInputStream is = new FileInputStream(classFile)) {
115-
//Check if a class file matches one of the pre-computed vulnerable SHAs.
113+
// Check if a class file matches one of the pre-computed vulnerable SHAs.
116114
if (ClassDetector.isVulnerableClass(is)) {
117115
isVulnerable = true;
118116
System.err.println("CVE-2021-44228 found declared as dependency in " + classFile);
@@ -125,5 +123,4 @@ public boolean run(String pathToJarFile) throws IOException {
125123
FileUtils.deleteDirectory(new File(folder));
126124
return isVulnerable;
127125
}
128-
129126
}

src/main/java/de/codeshield/log4jshell/Log4JProcessDetector.java

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package de.codeshield.log4jshell;
22

3+
import edu.emory.mathcs.backport.java.util.Collections;
34
import org.apache.commons.lang.StringUtils;
45

56
import java.io.BufferedReader;
@@ -30,32 +31,16 @@ public static void main(String[] args) throws IOException {
3031
}
3132

3233
// analyze each output
33-
// search for the "-classpath" parameter
3434
for (String outputLine : lines) {
35-
String searchStr = "-classpath";
36-
int i = StringUtils.indexOf(outputLine, searchStr);
37-
if (i == -1) {
38-
// check if someone used -cp
39-
searchStr = "-cp";
40-
i = StringUtils.indexOf(outputLine, searchStr);
41-
}
42-
43-
if (i > 0) {
44-
String cpArgs = outputLine.substring(i + searchStr.length() + 1);
45-
46-
// scan for jar files
47-
String[] cpArgsSplit = cpArgs.split(File.pathSeparator);
48-
final List<String> foundJarsOnCp =
49-
Arrays.stream(cpArgsSplit)
50-
.map(x -> StringUtils.substring(x, 0, StringUtils.indexOf(x, ".jar") + 4))
51-
.collect(Collectors.toList());
5235

36+
final List<String> foundJarsOnCp = parsePSOutPutClassPath(outputLine);
37+
if (!foundJarsOnCp.isEmpty()) {
5338
for (String jarFile : foundJarsOnCp) {
5439
try {
5540
Log4JDetector detector = new Log4JDetector();
5641
System.out.println("Scanning jar file " + jarFile);
57-
// detector.run(jarFile);
58-
} catch (Exception e){
42+
detector.run(jarFile);
43+
} catch (Exception e) {
5944
System.out.println("Could not scan jar file " + jarFile);
6045
}
6146
}
@@ -66,4 +51,30 @@ public static void main(String[] args) throws IOException {
6651
}
6752
}
6853
}
54+
55+
public static List<String> parsePSOutPutClassPath(String outputLine) {
56+
// search for the "-classpath" parameter
57+
58+
String searchStr = "-classpath";
59+
int i = StringUtils.indexOf(outputLine, searchStr);
60+
if (i == -1) {
61+
// check if someone used -cp
62+
searchStr = "-cp";
63+
i = StringUtils.indexOf(outputLine, searchStr);
64+
}
65+
if (i > 0) {
66+
String cpArgs = outputLine.substring(i + searchStr.length() + 1);
67+
68+
// scan for jar files
69+
String[] cpArgsSplit = cpArgs.split(File.pathSeparator);
70+
final List<String> foundJarsOnCp =
71+
Arrays.stream(cpArgsSplit)
72+
.filter(x -> StringUtils.indexOf(x, ".jar") > -1)
73+
.map(x -> StringUtils.substring(x, 0, StringUtils.indexOf(x, ".jar") + 4))
74+
.collect(Collectors.toList());
75+
return foundJarsOnCp;
76+
}
77+
78+
return Collections.emptyList();
79+
}
6980
}

src/main/java/de/codeshield/log4jshell/POMDetector.java

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@
22

33
import de.codeshield.log4jshell.data.GAVWithClassifier;
44
import de.codeshield.log4jshell.data.VulnerableGavsData;
5-
import java.io.IOException;
6-
import java.io.InputStream;
7-
import java.util.List;
8-
import java.util.Set;
95
import org.apache.maven.model.Dependency;
106
import org.apache.maven.model.Model;
117
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
128
import org.apache.maven.project.MavenProject;
139
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
1410

11+
import java.io.IOException;
12+
import java.io.InputStream;
13+
import java.util.List;
14+
import java.util.Set;
15+
1516
public class POMDetector {
1617

17-
private static final Set<GAVWithClassifier> VULNERABLE_GAV_DATA = VulnerableGavsData
18-
.readDataFromCSV();
18+
private static final Set<GAVWithClassifier> VULNERABLE_GAV_DATA =
19+
VulnerableGavsData.readDataFromCSV();
1920

2021
public static boolean isVulnerablePOM(InputStream inputStream) {
2122
final MavenXpp3Reader mavenreader = new MavenXpp3Reader();
@@ -24,21 +25,21 @@ public static boolean isVulnerablePOM(InputStream inputStream) {
2425
model = mavenreader.read(inputStream);
2526
MavenProject mavenProject = new MavenProject(model);
2627

27-
//Check whether the Maven Project or any of its parents is affected.
28+
// Check whether the Maven Project or any of its parents is affected.
2829
if (isVulnerableProject(mavenProject)) {
2930
return true;
3031
}
3132

32-
//Check if any of the dependencies is affected.
33+
// Check if any of the dependencies is affected.
3334
List dependencies = mavenProject.getDependencies();
3435
for (Object dependency : dependencies) {
3536
if (!(dependency instanceof Dependency)) {
3637
continue;
3738
}
3839
Dependency dep = (Dependency) dependency;
3940
if (VULNERABLE_GAV_DATA.contains(
40-
new GAVWithClassifier(dep.getGroupId(), dep.getArtifactId(), dep.getVersion(),
41-
dep.getClassifier()))) {
41+
new GAVWithClassifier(
42+
dep.getGroupId(), dep.getArtifactId(), dep.getVersion(), dep.getClassifier()))) {
4243
return true;
4344
}
4445
}
@@ -50,11 +51,13 @@ public static boolean isVulnerablePOM(InputStream inputStream) {
5051
return false;
5152
}
5253

53-
5454
private static boolean isVulnerableProject(MavenProject mavenProject) {
5555
if (VULNERABLE_GAV_DATA.contains(
56-
new GAVWithClassifier(mavenProject.getGroupId(), mavenProject.getArtifactId(),
57-
mavenProject.getVersion(), ""))) {
56+
new GAVWithClassifier(
57+
mavenProject.getGroupId(),
58+
mavenProject.getArtifactId(),
59+
mavenProject.getVersion(),
60+
""))) {
5861
return true;
5962
}
6063
MavenProject parent = mavenProject.getParent();

src/main/java/de/codeshield/log4jshell/data/GAVWithClassifier.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ public class GAVWithClassifier {
99
private final String version;
1010
private final String classifier;
1111

12-
public GAVWithClassifier(String groupId, String artifactId, String version,
13-
String classifier) {
12+
public GAVWithClassifier(String groupId, String artifactId, String version, String classifier) {
1413
this.groupId = groupId;
1514
this.artifactId = artifactId;
1615
this.version = version;
@@ -26,10 +25,10 @@ public boolean equals(Object o) {
2625
return false;
2726
}
2827
GAVWithClassifier that = (GAVWithClassifier) o;
29-
return Objects.equals(groupId, that.groupId) &&
30-
Objects.equals(artifactId, that.artifactId) &&
31-
Objects.equals(version, that.version) &&
32-
Objects.equals(classifier, that.classifier);
28+
return Objects.equals(groupId, that.groupId)
29+
&& Objects.equals(artifactId, that.artifactId)
30+
&& Objects.equals(version, that.version)
31+
&& Objects.equals(classifier, that.classifier);
3332
}
3433

3534
@Override

src/main/java/de/codeshield/log4jshell/data/VulnerableClassSHAData.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.opencsv.CSVReader;
44
import com.opencsv.exceptions.CsvException;
5+
56
import java.io.BufferedReader;
67
import java.io.IOException;
78
import java.io.InputStream;
@@ -22,12 +23,11 @@ public static Set<String> readDataFromCSV() {
2223
vulnerableSHAs.add(vulnerableClassSha[1]);
2324
}
2425
csvReader.close();
25-
} catch (IOException e) {
26-
System.err.println("Error reading CSV file ("+CSV_DATA+")");
26+
} catch (IOException e) {
27+
System.err.println("Error reading CSV file (" + CSV_DATA + ")");
2728
} catch (CsvException e) {
28-
System.err.println("Error parsing CSV file ("+CSV_DATA+")");
29+
System.err.println("Error parsing CSV file (" + CSV_DATA + ")");
2930
}
3031
return vulnerableSHAs;
3132
}
32-
3333
}

src/main/java/de/codeshield/log4jshell/data/VulnerableGavsData.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.opencsv.CSVReader;
44
import com.opencsv.exceptions.CsvException;
5+
56
import java.io.BufferedReader;
67
import java.io.IOException;
78
import java.io.InputStream;
@@ -16,16 +17,16 @@ public class VulnerableGavsData {
1617
public static Set<GAVWithClassifier> readDataFromCSV() {
1718
InputStream resource = VulnerableGavsData.class.getResourceAsStream(CSV_DATA);
1819
Set<GAVWithClassifier> vulnerableGavs = new HashSet<>();
19-
try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(resource))) {
20+
try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(resource))) {
2021
CSVReader csvReader = new CSVReader(bufferedReader);
2122
for (String[] dep : csvReader.readAll()) {
2223
vulnerableGavs.add(new GAVWithClassifier(dep[0], dep[1], dep[2], dep[3]));
2324
}
2425
csvReader.close();
2526
} catch (IOException e) {
26-
System.err.println("Error reading CSV file ("+CSV_DATA+")");
27+
System.err.println("Error reading CSV file (" + CSV_DATA + ")");
2728
} catch (CsvException e) {
28-
System.err.println("Error parsing CSV file ("+CSV_DATA+")");
29+
System.err.println("Error parsing CSV file (" + CSV_DATA + ")");
2930
}
3031
return vulnerableGavs;
3132
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package de.codeshield.log4jshell;
2+
3+
import junit.framework.TestCase;
4+
import org.junit.Test;
5+
6+
import java.util.List;
7+
8+
public class Log4JProcessDetectorTest extends TestCase {
9+
10+
@Test
11+
public void testParsePSOutPutClassPathInvalid() {
12+
String output =" 501 22825 22334 0 10:59am ttys000 0:00.01 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox java";
13+
14+
final List<String> strings = Log4JProcessDetector.parsePSOutPutClassPath(output);
15+
assertNotNull(strings);
16+
assertTrue(strings.isEmpty());
17+
18+
}
19+
20+
21+
@Test
22+
public void testParsePSOutPutClassPathValid() {
23+
String output=" 501 21080 20151 0 10:49am ?? 0:09.00 /Applications/IntelliJ IDEA.app/Contents/jbr/Contents/Home/bin/java -Djava.awt.headless=true -Dmaven.defaultProjectBuilder.disableGlobalModelCache=true -Didea.version=2021.2.2 -Didea.maven.embedder.version=3.6.3 -Xmx768m -Dmaven.ext.class.path=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven-event-listener.jar -Dfile.encoding=UTF-8 -classpath /Applications/IntelliJ IDEA.app/Contents/lib/util.jar:/Applications/IntelliJ IDEA.app/Contents/lib/annotations.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/lucene-core-2.4.1.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven-model/lib/maven-model.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven-server-api.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3-server-common.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3-server-lib/nexus-indexer-artifact-1.0.1.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3-server-lib/nexus-indexer-3.0.4.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3-server-lib/archetype-catalog-2.2.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3-server-lib/archetype-common-2.2.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3-server-lib/maven-dependency-tree-1.2.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3-server.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven36-server.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/maven-plugin-api-3.6.3.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/maven-compat-3.6.3.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/maven-resolver-util-1.4.1.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/plexus-component-annotations-2.1.0.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/maven-settings-builder-3.6.3.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/plexus-cipher-1.7.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/plexus-interpolation-1.25.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/maven-resolver-spi-1.4.1.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/guice-4.2.1-no_aop.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/maven-artifact-3.6.3.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/maven-resolver-provider-3.6.3.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/cdi-api-1.0.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/plexus-utils-3.2.1.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/plexus-sec-dispatcher-1.4.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/maven-repository-metadata-3.6.3.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/commons-cli-1.4.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/maven-resolver-transport-wagon-1.4.1.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/commons-io-2.5.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/jansi-1.17.1.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/maven-model-builder-3.6.3.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/maven-embedder-3.6.3.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/wagon-file-3.3.4.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/org.eclipse.sisu.inject-0.3.4.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/maven-resolver-connector-basic-1.4.1.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/maven-settings-3.6.3.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/maven-model-3.6.3.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/maven-resolver-api-1.4.1.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/jcl-over-slf4j-1.7.29.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/wagon-http-3.3.4-shaded.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/org.eclipse.sisu.plexus-0.3.4.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/slf4j-api-1.7.29.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/maven-builder-support-3.6.3.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/jsoup-1.12.1.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/wagon-provider-api-3.3.4.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/maven-shared-utils-3.2.1.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/maven-resolver-impl-1.4.1.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/maven-core-3.6.3.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/javax.inject-1.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/commons-lang3-3.8.1.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/guava-25.1-android.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/lib/jsr250-api-1.0.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds.license:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.6.0.jar org.jetbrains.idea.maven.server.RemoteMavenServer36";
24+
final List<String> strings = Log4JProcessDetector.parsePSOutPutClassPath(output);
25+
assertNotNull(strings);
26+
assertFalse(strings.isEmpty());
27+
assertEquals(55, strings.size());
28+
}
29+
}

0 commit comments

Comments
 (0)