core/src/main/java/org/apache/commons/vfs2/util/Messages.java
/**
     * Locates a message by its code.
     */
Locates a message by its code.
Locates a message by its code .
private static MessageFormat findMessage(final String code)
        throws MissingResourceException
    {
        MessageFormat msg = messages.get(code);
        if (msg != null)
        {
            return msg;
        }
        if (resources == null)
        {
            resources = new CombinedResources("org.apache.commons.vfs2.Resources");
        }
        final String msgText = resources.getString(code);
        msg = new MessageFormat(msgText);
        messages.putIfAbsent(code, msg);
        return messages.get(code);
    }
private static MessageFormat findMessage ( final String code ) throws MissingResourceException { MessageFormat msg = messages . get ( code ) ; if ( msg != null ) { return msg ; } if ( resources == null ) { resources = new CombinedResources ( "org.apache.commons.vfs2.Resources" ) ; } final String msgText = resources . getString ( code ) ; msg = new MessageFormat ( msgText ) ; messages . putIfAbsent ( code , msg ) ; return messages . get ( code ) ; }
Locates a message by its code.
Locates a message by its code .
// Check if the message is cached // Locate the message