Skip to content

Commit

Permalink
Workaround spotbugs false positive
Browse files Browse the repository at this point in the history
  • Loading branch information
olpaw committed Mar 29, 2019
1 parent eefeb5c commit 3119f75
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.graalvm.nativeimage.ProcessProperties;

import com.oracle.svm.core.option.HostedOptionKey;
import com.oracle.svm.core.util.VMError;

/**
* This class is used to generate fallback images in case we are unable to build standalone images.
Expand Down Expand Up @@ -70,7 +71,11 @@ public static void main(String[] args) {
command.add(p);
}
}
String pathPrefix = Paths.get(ProcessProperties.getExecutableName()).getParent().toAbsolutePath().normalize().toString();
Path fallbackImageDir = Paths.get(ProcessProperties.getExecutableName()).getParent();
if (fallbackImageDir == null) {
VMError.shouldNotReachHere();
}
String pathPrefix = fallbackImageDir.toAbsolutePath().normalize().toString();
String relativeClasspath = Options.FallbackExecutorClasspath.getValue();
String[] split = SubstrateUtil.split(relativeClasspath, File.pathSeparator);
for (int i = 0; i < split.length; i++) {
Expand Down

0 comments on commit 3119f75

Please sign in to comment.