essobedo commented on code in PR #11759:
URL: https://github.com/apache/camel/pull/11759#discussion_r1363924922


##########
components/camel-sql/src/main/java/org/apache/camel/processor/idempotent/jdbc/JdbcMessageIdRepository.java:
##########
@@ -65,12 +75,12 @@ protected void doInit() throws Exception {
 
         if (tableName != null) {
             // update query strings from default table name to the new table 
name
-            tableExistsString = 
tableExistsString.replaceFirst(DEFAULT_TABLENAME, tableName);
-            createString = createString.replaceFirst(DEFAULT_TABLENAME, 
tableName);
-            queryString = queryString.replaceFirst(DEFAULT_TABLENAME, 
tableName);
-            insertString = insertString.replaceFirst(DEFAULT_TABLENAME, 
tableName);
-            deleteString = deleteString.replaceFirst(DEFAULT_TABLENAME, 
tableName);
-            clearString = clearString.replaceFirst(DEFAULT_TABLENAME, 
tableName);
+            tableExistsString = 
DEFAULT_TABLE_EXISTS_STRING.replaceFirst(DEFAULT_TABLENAME, tableName);

Review Comment:
   You should use `replace` instead of `replaceFirst` to avoid using a regular 
expression behind the scenes



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to