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

Bug in MethodInfo.getReturnTypeString method. #68

Open
lubomirbenes opened this issue Jun 10, 2024 · 0 comments
Open

Bug in MethodInfo.getReturnTypeString method. #68

lubomirbenes opened this issue Jun 10, 2024 · 0 comments

Comments

@lubomirbenes
Copy link

Hello,

getReturnTypeString(boolean fullyQualified) does not return fully qualified name when first time it was called with false.

getReturnTypeStringFromTypeSignature should be called with true not with parameter fullyQualified

public String getReturnTypeString(boolean fullyQualified) {
		if (returnType==null) {
			returnType = getReturnTypeStringFromTypeSignature(true);
			if (returnType==null) {
				returnType = getReturnTypeStringFromDescriptor(true);
			}
		}
		if (!fullyQualified) {
			if(returnType != null && returnType.contains(".")) {
				return returnType.substring(returnType.lastIndexOf(".") +1);
			}
		}
		return returnType;
	}
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