Skip to content

Commit

Permalink
minor refactor of SQLHintUtils (#29231)
Browse files Browse the repository at this point in the history
  • Loading branch information
strongduanmu authored Nov 29, 2023
1 parent da95e15 commit 75992f9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static Properties getSQLHintProps(final String comment) {
int endIndex = comment.endsWith(SQL_COMMENT_SUFFIX) ? comment.indexOf(SQL_COMMENT_SUFFIX) : comment.length();
Collection<String> sqlHints = Splitter.on(SQL_HINT_SPLIT).trimResults().splitToList(comment.substring(startIndex, endIndex).trim());
for (String each : sqlHints) {
List<String> hintValues = Splitter.on(SQL_HINT_VALUE_SPLIT).trimResults().splitToList(each);
List<String> hintValues = Splitter.on(SQL_HINT_VALUE_SPLIT).limit(SQL_HINT_VALUE_SIZE).trimResults().splitToList(each);
if (SQL_HINT_VALUE_SIZE == hintValues.size()) {
result.put(hintValues.get(0), convert(hintValues.get(1)));
}
Expand Down

0 comments on commit 75992f9

Please sign in to comment.