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

Possible bug in org.fife.rsta.ac.java.classreader.MethodInfo.java #47

Open
lubomirbenes opened this issue Jun 22, 2018 · 0 comments
Open
Assignees

Comments

@lubomirbenes
Copy link

Hello,

it seems there is a bug in getReturnTypeString(boolean fullyQualified) method. When method is called first with fullyQualified = false the global returnType variable is initialized by not qualified type name and then not updated. In next call unqualified name is returned.

Here is my code to fix it:

/**
 * Returns the return type of this method.
 *
 * @return The return type of this method.
 */
public String getReturnTypeString(boolean fullyQualified) {
        String returnType0;
	if (returnType==null) {
		returnType0 = getReturnTypeStringFromTypeSignature(fullyQualified);
		if (returnType0==null) {
			returnType0 = getReturnTypeStringFromDescriptor(fullyQualified);
		}
	} else {
                returnType0 = returnType;
            }
	if(!fullyQualified)
	{
		if(returnType0 != null && returnType0.indexOf(".") > -1) {
			return returnType0.substring(returnType0.lastIndexOf(".") +1, returnType0.length());  
		}
	} else {
                returnType = returnType0;
            }
	return returnType;
}
@bobbylight bobbylight self-assigned this Nov 12, 2018
@bobbylight bobbylight transferred this issue from bobbylight/RSyntaxTextArea Jan 4, 2019
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

2 participants