src/main/java/ognl/ObjectPropertyAccessor.java
public Object getPossibleProperty(Map context, Object target, String name)
            throws OgnlException
    {
        Object result;
        OgnlContext ognlContext = (OgnlContext) context;

        try {
            if ((result = OgnlRuntime.getMethodValue(ognlContext, target, name, true)) == OgnlRuntime.NotFound)
            {
                result = OgnlRuntime.getFieldValue(ognlContext, target, name, true);
            }
        } catch (IntrospectionException ex) {
            throw new OgnlException(name, ex);
        } catch (OgnlException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new OgnlException(name, ex);
        }

        return result;
    }
public Object getPossibleProperty(Map context, Object target, String name)
            throws OgnlException
    {
        Object result;
        OgnlContext ognlContext = (OgnlContext) context;

        try {
            if ((result = OgnlRuntime.getMethodValue(ognlContext, target, name, true)) == OgnlRuntime.NotFound)
            {
                result = OgnlRuntime.getFieldValue(ognlContext, target, name, true);
            }
        } catch (IntrospectionException ex) {
            throw new OgnlException(name, ex);
        } catch (OgnlException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new OgnlException(name, ex);
        }

        return result;
    }
Returns OgnlRuntime.NotFound if the property does not exist.