Skip to content

Commit c1173cb

Browse files
Add missing commit (#5)
1 parent e1a432b commit c1173cb

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<groupId>org.soot-oss</groupId>
77
<artifactId>soot-utbot-fork</artifactId>
88
<name>Soot - a J*va Optimization Framework</name>
9-
<version>4.4.0-SNAPSHOT</version>
9+
<version>4.4.0-FORK-1</version>
1010
<description>A Java Optimization Framework</description>
1111
<url>https://soot-oss.github.io/soot</url>
1212
<organization>

src/main/java/soot/ModulePathSourceLocator.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -502,16 +502,16 @@ public IFoundFile lookUpInModulePath(String fileName) {
502502
}
503503
// transform the path to a String to reuse the
504504
String uriString = foundModulePath.toUri().toString();
505-
String dir = uriString.startsWith("jrt:/") ? uriString : foundModulePath.toAbsolutePath().toString();
505+
Path dir = uriString.startsWith("jrt:/") ? foundModulePath : foundModulePath.toAbsolutePath();
506506

507507
ClassSourceType cst = getClassSourceType(foundModulePath);
508508
if (null != cst) {
509509
switch (cst) {
510510
case zip:
511511
case jar:
512-
return lookupInArchive(dir, className);
512+
return lookupInArchive(dir.toUri().toString(), className);
513513
case directory:
514-
return lookupInDir(dir, className);
514+
return lookupInDir(dir.toUri().toString(), className);
515515
case jrt:
516516
return lookUpInVirtualFileSystem(dir, className);
517517
}
@@ -587,9 +587,8 @@ protected IFoundFile lookupInArchive(String archivePath, String fileName) {
587587
* the file to search
588588
* @return the FoundFile
589589
*/
590-
public IFoundFile lookUpInVirtualFileSystem(String archivePath, String fileName) {
591-
// FileSystem fs = FileSystems.getFileSystem(URI.create(archivePath));
592-
Path foundFile = Paths.get(URI.create(archivePath)).resolve(fileName);
590+
public IFoundFile lookUpInVirtualFileSystem(Path archivePath, String fileName) {
591+
Path foundFile = archivePath.resolve(fileName);
593592
if (foundFile != null && Files.isRegularFile(foundFile)) {
594593
return new FoundFile(foundFile);
595594
} else {

src/main/java/soot/asm/AsmJava9ClassProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public ClassSource find(String cls) {
5353
try (DirectoryStream<Path> stream = Files.newDirectoryStream(p)) {
5454
for (Path entry : stream) {
5555
// check each module folder for the class
56-
file = ModulePathSourceLocator.v().lookUpInVirtualFileSystem(entry.toUri().toString(), clsFile);
56+
file = ModulePathSourceLocator.v().lookUpInVirtualFileSystem(entry, clsFile);
5757
if (file != null) {
5858
break;
5959
}

0 commit comments

Comments
 (0)