src/main/java/ognl/OgnlRuntime.java
public static boolean shouldConvertNumericTypes(OgnlContext context)
    {
        if (context.getCurrentType() == null || context.getPreviousType() == null)
            return true;

        if (context.getCurrentType() == context.getPreviousType()
            && context.getCurrentType().isPrimitive() && context.getPreviousType().isPrimitive())
            return false;

        return context.getCurrentType() != null && !context.getCurrentType().isArray()
               && context.getPreviousType() != null && !context.getPreviousType().isArray();
    }
public static boolean shouldConvertNumericTypes(OgnlContext context)
    {
        if (context.getCurrentType() == null || context.getPreviousType() == null)
            return true;

        if (context.getCurrentType() == context.getPreviousType()
            && context.getCurrentType().isPrimitive() && context.getPreviousType().isPrimitive())
            return false;

        return context.getCurrentType() != null && !context.getCurrentType().isArray()
               && context.getPreviousType() != null && !context.getPreviousType().isArray();
    }
public static boolean shouldConvertNumericTypes ( OgnlContext context ) { if ( context . getCurrentType ( ) == null || context . getPreviousType ( ) == null ) return true ; if ( context . getCurrentType ( ) == context . getPreviousType ( ) && context . getCurrentType ( ) . isPrimitive ( ) && context . getPreviousType ( ) . isPrimitive ( ) ) return false ; return context . getCurrentType ( ) != null && ! context . getCurrentType ( ) . isArray ( ) && context . getPreviousType ( ) != null && ! context . getPreviousType ( ) . isArray ( ) ; }
Compares the {@link OgnlContext#getCurrentType()} and {@link OgnlContext#getPreviousType()} class types
on the stack to determine if a numeric expression should force object conversion.
<p/>
<p/>
Normally used in conjunction with the <code>forceConversion</code> parameter of
{@link OgnlRuntime#getChildSource(OgnlContext,Object,Node,boolean)}.
</p>

@param context The current context.
@return True, if the class types on the stack wouldn't be comparable in a pure numeric expression such as <code>o1 >= o2</code>.
Compares the { @link OgnlContext#getCurrentType () } and { @link OgnlContext#getPreviousType () } class types on the stack to determine if a numeric expression should force object conversion . <p / > <p / > Normally used in conjunction with the <code > forceConversion< / code > parameter of { @link OgnlRuntime#getChildSource ( OgnlContext Object Node boolean ) } . < / p >