Code review comment: Can `jMethodRequest.bReturnType` have an error type? If so, this can lead to multiple `error` in the diagnostic message.

Code under review:
private void validateExceptionTypes(JMethodRequest jMethodRequest, JMethod jMethod) {

        Executable method = jMethod.getMethod();
        boolean throwsCheckedException = false;
        boolean returnsErrorValue;
        try {
            for (Class<?> exceptionType : method.getExceptionTypes()) {
                if (!this.classLoader.loadClass(RuntimeException.class.getCanonicalName())
                        .isAssignableFrom(exceptionType)) {
                    throwsCheckedException = true;
                    break;
                }
            }
            returnsErrorValue = method instanceof Method && (this.classLoader
                    .loadClass(BError.class.getCanonicalName())
                    .isAssignableFrom(((Method) method).getReturnType()) ||
                    this.classLoader.loadClass(Object.class.getCanonicalName())
                            .isAssignableFrom(((Method) method).getReturnType()));
        } catch (ClassNotFoundException | NoClassDefFoundError e) {
            throw new JInteropException(CLASS_NOT_FOUND, e.getMessage(), e);
        }

        if ((throwsCheckedException && !jMethodRequest.returnsBErrorType) ||
                (jMethodRequest.returnsBErrorType && !throwsCheckedException && !returnsErrorValue)) {
            throw new JInteropException(DiagnosticErrorCode.METHOD_SIGNATURE_DOES_NOT_MATCH,
                    "Incompatible ballerina return type for the Java method '" + jMethodRequest.methodName +
                            "' which throws checked exception found in class '" + jMethodRequest.declaringClass +
                            "': expected '" + jMethodRequest.bReturnType + "|error', found '" +
                            jMethodRequest.bReturnType + "'");
        }
    }

Line commented on: "': expected '" + jMethodRequest.bReturnType + "|error', found '" +

Revised code:
private void validateExceptionTypes(JMethodRequest jMethodRequest, JMethod jMethod) {

        Executable method = jMethod.getMethod();
        boolean throwsCheckedException = false;
        boolean returnsErrorValue;
        try {
            for (Class<?> exceptionType : method.getExceptionTypes()) {
                if (!this.classLoader.loadClass(RuntimeException.class.getCanonicalName())
                        .isAssignableFrom(exceptionType)) {
                    throwsCheckedException = true;
                    break;
                }
            }
            returnsErrorValue = method instanceof Method && (this.classLoader
                    .loadClass(BError.class.getCanonicalName())
                    .isAssignableFrom(((Method) method).getReturnType()) ||
                    this.classLoader.loadClass(Object.class.getCanonicalName())
                            .isAssignableFrom(((Method) method).getReturnType()));
        } catch (ClassNotFoundException | NoClassDefFoundError e) {
            throw new JInteropException(CLASS_NOT_FOUND, e.getMessage(), e);
        }

        if ((throwsCheckedException && !jMethodRequest.returnsBErrorType) ||
                (jMethodRequest.returnsBErrorType && !throwsCheckedException && !returnsErrorValue)) {
            BType returnType = jMethodRequest.bReturnType;
            String expectedRetTypeName;
            if (returnType.tag == TypeTags.NIL || returnType instanceof BTypeReferenceType &&
                    ((BTypeReferenceType) returnType).referredType.tag == TypeTags.ERROR) {
                expectedRetTypeName = "error";
            } else if (returnType instanceof BUnionType) {
                BUnionType bUnionReturnType = (BUnionType) returnType;
                BType modifiedRetType = BUnionType.create(null, getNonErrorMembers(bUnionReturnType));
                expectedRetTypeName = modifiedRetType + "|error";
            } else {
                expectedRetTypeName = returnType + "|error";
            }
            throw new JInteropException(DiagnosticErrorCode.METHOD_SIGNATURE_DOES_NOT_MATCH,
                    "Incompatible ballerina return type for Java method '" + jMethodRequest.methodName + "' which " +
                            "throws checked exception found in class '" + jMethodRequest.declaringClass.getName() +
                            "': expected '" + expectedRetTypeName + "', found '" + returnType + "'");
        }
    }