assert obj1 != null && obj2 != null;
if (obj1 == null || obj2 == null) {  if (obj1 == null && obj2 != null) return -1; else if (obj1 != null && obj2 == null) return 1; else return 0; }
	private static int compare( Object obj1, Object obj2 ) throws DataException	{		assert obj1 != null && obj2 != null;				try		{			if ( isSameType( obj1, obj2 ) )			{				return ( (Comparable) obj1 ).compareTo( obj2 );			}			else if ( isNumericOrString( obj1 ) && isNumericOrString( obj2 ) )			{				return DataTypeUtil.toDouble( obj1 ).compareTo(						DataTypeUtil.toDouble( obj2 ) );			}			else if ( isDateOrString( obj1 ) && isDateOrString( obj2 ) )			{				return DataTypeUtil.toDate( obj1 ).compareTo(						DataTypeUtil.toDate( obj2 ) );			}			else				throw new DataException( ResourceConstants.INVALID_TYPE_IN_EXPR );		}		catch ( BirtException e )		{			throw new DataException( ResourceConstants.DATATYPEUTIL_ERROR, e );		}	}