public static void validateSelection(String selection,Set<String> allowedColumns){
  try {
    if (selection == null || selection.isEmpty()) {
      return;
    }
    Lexer lexer=new Lexer(selection,allowedColumns);
    parseExpression(lexer);
    if (lexer.currentToken() != Lexer.TOKEN_END) {
      throw new IllegalArgumentException("syntax error");
    }
  }
 catch (  RuntimeException ex) {
    LLog.d("invalid selection [" + selection + "] triggered "+ ex);
  }
}

public static void validateSelection ( String selection , Set < String > allowedColumns ) { try { if ( selection == null || selection . isEmpty ( ) ) { return ; } Lexer lexer = new Lexer ( selection , allowedColumns ) ; parseExpression ( lexer ) ; if ( lexer . currentToken ( ) != Lexer . TOKEN_END ) { throw new IllegalArgumentException ( "syntax error" ) ; } } catch ( RuntimeException ex ) { LLog . d ( "invalid selection [" + selection + "] triggered " + ex ) ; } }
checks whether this looks like a legitimate selection parameter
