public static String getOption ( String key , boolean forceFormat , Object ... args ) { String option = options . getString ( key ) ; if ( forceFormat || args . length > 0 ) { return MessageFormat . format ( option , args ) ; } else { return option ; } }
get the string from options resource bundle . if forceFormat is set to true or args has value the code invokes MessageFormat . format method even args is not set . This is for processing double single quotes . Since NLS_MESSAGEFORMAT_ALL is set for options resource bundle every single quote character which needs to be treated as a single quote is escaped by another single quote . Otherwise MessageFormat . format method will treat a single quote as the beginning and ending of the quote . So all of the texts needs to be processed by MessageFormat no matter whether it has variables .