Browse Source

Merge pull request #279 in CORE/base-third from ~BJORN/base-third:release/10.0 to release/10.0

* commit '36b0a3169fb6eb26cd694ca3ec24f3c27fd87efc':
  CHART-10607 linux下缺失了系统供应商信息的文件会导致栈溢出
release/10.0
eason 5 years ago
parent
commit
31a01d3a70
  1. 8
      fine-j2v8/src/com/eclipsesource/v8/PlatformDetector.java

8
fine-j2v8/src/com/eclipsesource/v8/PlatformDetector.java

@ -125,7 +125,9 @@ public class PlatformDetector {
return "google";
}
throw new UnsatisfiedLinkError("Unsupported vendor: " + getName());
//如果if条件全部不符合,就会陷入死循环,代码存在风险
//throw new UnsatisfiedLinkError("Unsupported vendor: " + getName());
return "";
}
private static String getLinuxOsReleaseId() {
@ -144,7 +146,9 @@ public class PlatformDetector {
return parseLinuxRedhatReleaseFile(file);
}
throw new UnsatisfiedLinkError("Unsupported linux vendor: " + getName());
//linux系统下如果缺失/etc/os-release,/usr/lib/os-release,/etc/redhat-release三个文件,就会和getName方法就会一直互相调用
//throw new UnsatisfiedLinkError("Unsupported linux vendor: " + getName());
return "";
}
private static String parseLinuxOsReleaseFile(final File file) {

Loading…
Cancel
Save