8255225: compiler/aot tests fail on Windows with NPE during artifact resolution
Reviewed-by: erikj, clanger
This commit is contained in:
parent
a824781b8c
commit
64dc4b1888
@ -14,14 +14,22 @@ public class ArtifactResolverException extends Exception {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return super.toString() + ": " + getRootCause().toString();
|
Throwable root = getRootCause();
|
||||||
|
if (root != null) {
|
||||||
|
return super.toString() + ": " + root.toString();
|
||||||
|
} else {
|
||||||
|
return super.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Throwable getRootCause() {
|
public Throwable getRootCause() {
|
||||||
Throwable rootCause = getCause();
|
Throwable root = getCause();
|
||||||
while (rootCause.getCause() != null && rootCause.getCause() != rootCause) {
|
if (root == null) {
|
||||||
rootCause = rootCause.getCause();
|
return null;
|
||||||
}
|
}
|
||||||
return rootCause;
|
while (root.getCause() != null && root.getCause() != root) {
|
||||||
|
root = root.getCause();
|
||||||
|
}
|
||||||
|
return root;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user