Parser { public static boolean parseUpdateKeyword(final char[] query, int offset) { if (query.length < (offset + 6)) { return false; } return (query[offset] | 32) == 'u' && (query[offset + 1] | 32) == 'p' && (query[offset + 2] | 32) == 'd' && (query[offset + 3] | 32) == 'a' && (query[offset + 4] | 32) == 't' && (query[offset + 5] | 32) == 'e'; }  static List<NativeQuery> parseJdbcSql(String query, boolean standardConformingStrings,
      boolean withParameters, boolean splitStatements,
      boolean isBatchedReWriteConfigured,
      String... returningColumnNames); static int parseSingleQuotes(final char[] query, int offset,
      boolean standardConformingStrings); static int parseDoubleQuotes(final char[] query, int offset); static int parseDollarQuotes(final char[] query, int offset); static int parseLineComment(final char[] query, int offset); static int parseBlockComment(final char[] query, int offset); static boolean parseDeleteKeyword(final char[] query, int offset); static boolean parseInsertKeyword(final char[] query, int offset); static boolean parseMoveKeyword(final char[] query, int offset); static boolean parseReturningKeyword(final char[] query, int offset); static boolean parseSelectKeyword(final char[] query, int offset); static boolean parseUpdateKeyword(final char[] query, int offset); static boolean parseValuesKeyword(final char[] query, int offset); static long parseLong(String s, int beginIndex, int endIndex); static boolean parseWithKeyword(final char[] query, int offset); static boolean parseAsKeyword(final char[] query, int offset); static boolean isDigitAt(String s, int pos); static int digitAt(String s, int pos); static boolean isSpace(char c); static boolean isArrayWhiteSpace(char c); static boolean isOperatorChar(char c); static boolean isIdentifierStartChar(char c); static boolean isIdentifierContChar(char c); static boolean charTerminatesIdentifier(char c); static boolean isDollarQuoteStartChar(char c); static boolean isDollarQuoteContChar(char c); static JdbcCallParseInfo modifyJdbcCall(String jdbcSql, boolean stdStrings,
      int serverVersion, int protocolVersion, EscapeSyntaxCallMode escapeSyntaxCallMode); static String replaceProcessing(String sql, boolean replaceProcessingEnabled,
      boolean standardConformingStrings);  }
@Test public void testUpdateCommandParsing() { char[] command = new char[6]; "UPDATE".getChars(0, 6, command, 0); assertTrue("Failed to correctly parse upper case command.", Parser.parseUpdateKeyword(command, 0)); "UpDateE".getChars(0, 6, command, 0); assertTrue("Failed to correctly parse mixed case command.", Parser.parseUpdateKeyword(command, 0)); "updatE".getChars(0, 6, command, 0); assertTrue("Failed to correctly parse mixed case command.", Parser.parseUpdateKeyword(command, 0)); "Update".getChars(0, 6, command, 0); assertTrue("Failed to correctly parse mixed case command.", Parser.parseUpdateKeyword(command, 0)); "update".getChars(0, 6, command, 0); assertTrue("Failed to correctly parse lower case command.", Parser.parseUpdateKeyword(command, 0)); }