swfutils/src/main/java/flash/localization/LocalizationManager.java [77:115]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    protected static String replaceInlineReferences( String text, Map parameters )
    {
        if (parameters == null)
            return text;

        int depth = 100;
        while (depth-- > 0)
        {
            int o = text.indexOf( "${" );
            if (o == -1)
                break;
            if ((o >= 1) && (text.charAt( o-1 ) == '$'))
            {
                o = text.indexOf( "${", o+2 );
                if (o == -1)
                    break;
            }

            int c = text.indexOf( "}", o );

            if (c == -1)
            {
                return null; // FIXME
            }
            String name = text.substring( o + 2, c );
            String value = null;
            if (parameters.containsKey( name ) && (parameters.get( name ) != null))
            {
                value = parameters.get( name ).toString();
            }

            if (value == null)
            {
                value = "";
            }
            text = text.substring( 0, o ) + value + text.substring( c + 1 );
        }
        return text.replaceAll( "[$][$][{]", "\\${" );
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



compiler-common/src/main/java/org/apache/royale/compiler/internal/config/localization/LocalizationManager.java [83:121]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    protected static String replaceInlineReferences( String text, Map<String, Object> parameters )
    {
        if (parameters == null)
            return text;

        int depth = 100;
        while (depth-- > 0)
        {
            int o = text.indexOf( "${" );
            if (o == -1)
                break;
            if ((o >= 1) && (text.charAt( o-1 ) == '$'))
            {
                o = text.indexOf( "${", o+2 );
                if (o == -1)
                    break;
            }

            int c = text.indexOf( "}", o );

            if (c == -1)
            {
                return null;
            }
            String name = text.substring( o + 2, c );
            String value = null;
            if (parameters.containsKey( name ) && (parameters.get( name ) != null))
            {
                value = parameters.get( name ).toString();
            }

            if (value == null)
            {
                value = "";
            }
            text = text.substring( 0, o ) + value + text.substring( c + 1 );
        }
        return text.replaceAll( "[$][$][{]", "\\${" );
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



