String key = String.valueOf( dateStyle ) + ":" + String.valueOf( timeStyle ) + ":" + locale.getName( ); DateFormat result = (DateFormat) dateTimeFormatholder.get( key );
Integer key = new Integer( locale.getName( ).hashCode( ) * 25 + dateStyle * 5 + timeStyle ); DateFormat result = null; try { result = (DateFormat) dateTimeFormatholder.get( key ); } catch ( Exception e ) { result = null; }
	public static DateFormat getDateTimeInstance( int dateStyle, int timeStyle,			ULocale locale )	{		//DateFormatIdentifier key = new DateFormatIdentifier(dateStyle,timeStyle,locale) ;		String key = String.valueOf( dateStyle )				+ ":" + String.valueOf( timeStyle ) + ":" + locale.getName( );		DateFormat result = (DateFormat) dateTimeFormatholder.get( key );				//This code block is added to solve the problem that the uncached datetimeformatter being used			if ( result == null )		{			synchronized ( dateTimeFormatholder )			{				result = (DateFormat) dateTimeFormatholder.get( key );				if ( result == null )				{					result = DateFormat.getDateTimeInstance( dateStyle,							timeStyle,							locale );					result.setLenient( false );					dateTimeFormatholder.put( key, result );				}			}		}				return result;	}