Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ protected Object loadReferenceTypeLock() {

@Override
protected void maybeEagerlyResolve(int cpi, int bytecode) {
lastUnresolvedElementException = null;
try {
super.maybeEagerlyResolve(cpi, bytecode);
} catch (UnresolvedElementException e) {
Expand All @@ -294,12 +295,19 @@ protected void maybeEagerlyResolve(int cpi, int bytecode) {
* ConstantPool.lookupType() which should return an UnresolvedJavaType which we
* know how to deal with.
*/
lastUnresolvedElementException = e;
} else {
throw e;
}
}
}

/**
* The type resolution error, if any, encountered in the last call to
* {@link #maybeEagerlyResolve}.
*/
UnresolvedElementException lastUnresolvedElementException;

@Override
protected JavaType maybeEagerlyResolve(JavaType type, ResolvedJavaType accessingClass) {
try {
Expand Down Expand Up @@ -594,7 +602,7 @@ private static Class<?>[] signatureToClasses(JavaMethod method) {
}

private void reportUnresolvedElement(String elementKind, String elementAsString) {
reportUnresolvedElement(elementKind, elementAsString, null);
reportUnresolvedElement(elementKind, elementAsString, lastUnresolvedElementException);
}

private void reportUnresolvedElement(String elementKind, String elementAsString, Throwable cause) {
Expand Down