Skip to content
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

CtTypeReferenceImpl#getSuperClass() fails in noClasspath mode #1125

Closed
msteinbeck opened this issue Jan 17, 2017 · 0 comments
Closed

CtTypeReferenceImpl#getSuperClass() fails in noClasspath mode #1125

msteinbeck opened this issue Jan 17, 2017 · 0 comments

Comments

@msteinbeck
Copy link
Contributor

The method has the following implementation:

@Override
public CtTypeReference<?> getSuperclass() {
	CtType<T> t = getDeclaration();
	if (t != null) {
		return t.getSuperclass();
	} else {
		Class<T> c = getActualClass();
		Class<?> sc = c.getSuperclass();
		if (sc == null) {
			return null;
		}
		return getFactory().Type().createReference(sc);
	}
}

As you can see, it doesn't check for noClasspath and, thus, may fail when calling getActualClass().

msteinbeck pushed a commit to msteinbeck/spoon that referenced this issue Jan 18, 2017
@surli surli closed this as completed in 5b21903 Jan 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant