private static boolean missingFormatArgs ( String value ) { try { Formatter . check ( value ) ; } catch ( MissingFormatArgumentException e ) { return true ; } catch ( Exception ignored ) { // we don't care about other errors (it isn't supposed to be a format string) } return false ; }
Returns true for strings that contain format specifiers .