src/main/java/ognl/Ognl.java
public static Map addDefaultContext(Object root, MemberAccess memberAccess, ClassResolver classResolver,
                                        TypeConverter converter, Map context)
    {
        OgnlContext result;

        if (context instanceof OgnlContext) {
            result = (OgnlContext) context;
        } else {
            result = new OgnlContext(memberAccess, classResolver, converter, context);
        }

        result.setRoot(root);
        return result;
    }
public static Map addDefaultContext(Object root, MemberAccess memberAccess, ClassResolver classResolver,
                                        TypeConverter converter, Map context)
    {
        OgnlContext result;

        if (context instanceof OgnlContext) {
            result = (OgnlContext) context;
        } else {
            result = new OgnlContext(memberAccess, classResolver, converter, context);
        }

        result.setRoot(root);
        return result;
    }
Appends the standard naming context for evaluating an OGNL expression into the context given
so that cached maps can be used as a context.

@param root
the root of the object graph
@param memberAccess
Definition for handling private/protected access.
@param classResolver
The class loading resolver that should be used to resolve class references.
@param converter
The type converter to be used by default.
@param context
Default context to use, if not an {@link OgnlContext} will be dumped into
a new {@link OgnlContext} object.
@return Context Map with the keys <CODE>root</CODE> and <CODE>context</CODE> set
appropriately