Skip to content

Add missing commit #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>org.soot-oss</groupId>
<artifactId>soot-utbot-fork</artifactId>
<name>Soot - a J*va Optimization Framework</name>
<version>4.4.0-SNAPSHOT</version>
<version>4.4.0-FORK-1</version>
<description>A Java Optimization Framework</description>
<url>https://soot-oss.github.io/soot</url>
<organization>
Expand Down
11 changes: 5 additions & 6 deletions src/main/java/soot/ModulePathSourceLocator.java
Original file line number Diff line number Diff line change
Expand Up @@ -502,16 +502,16 @@ public IFoundFile lookUpInModulePath(String fileName) {
}
// transform the path to a String to reuse the
String uriString = foundModulePath.toUri().toString();
String dir = uriString.startsWith("jrt:/") ? uriString : foundModulePath.toAbsolutePath().toString();
Path dir = uriString.startsWith("jrt:/") ? foundModulePath : foundModulePath.toAbsolutePath();

ClassSourceType cst = getClassSourceType(foundModulePath);
if (null != cst) {
switch (cst) {
case zip:
case jar:
return lookupInArchive(dir, className);
return lookupInArchive(dir.toUri().toString(), className);
case directory:
return lookupInDir(dir, className);
return lookupInDir(dir.toUri().toString(), className);
case jrt:
return lookUpInVirtualFileSystem(dir, className);
}
Expand Down Expand Up @@ -587,9 +587,8 @@ protected IFoundFile lookupInArchive(String archivePath, String fileName) {
* the file to search
* @return the FoundFile
*/
public IFoundFile lookUpInVirtualFileSystem(String archivePath, String fileName) {
// FileSystem fs = FileSystems.getFileSystem(URI.create(archivePath));
Path foundFile = Paths.get(URI.create(archivePath)).resolve(fileName);
public IFoundFile lookUpInVirtualFileSystem(Path archivePath, String fileName) {
Path foundFile = archivePath.resolve(fileName);
if (foundFile != null && Files.isRegularFile(foundFile)) {
return new FoundFile(foundFile);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/soot/asm/AsmJava9ClassProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public ClassSource find(String cls) {
try (DirectoryStream<Path> stream = Files.newDirectoryStream(p)) {
for (Path entry : stream) {
// check each module folder for the class
file = ModulePathSourceLocator.v().lookUpInVirtualFileSystem(entry.toUri().toString(), clsFile);
file = ModulePathSourceLocator.v().lookUpInVirtualFileSystem(entry, clsFile);
if (file != null) {
break;
}
Expand Down