File tree Expand file tree Collapse file tree
src/main/java/io/github/intisy/utils/custom Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ public void deleteData(String tableName, String... whereClause) {
9696 }
9797
9898 private boolean isInvalidIdentifier (String identifier ) {
99- return identifier == null || !identifier .matches ("[A-Za-z0-9_]+" );
99+ return !identifier .matches ("[A-Za-z0-9_- ]+" );
100100 }
101101
102102 private String buildDeleteStatement (String tableName , String ... whereClause ) {
@@ -252,10 +252,7 @@ public void insertDataIfEmpty(String tableName, Object... columnsAndValues) {
252252
253253 private boolean isInvalidIdentifier (Object [] identifier ) {
254254 for (Object object : identifier )
255- if (object == null ) {
256- Log .error ("Invalid identifier: object is null" );
257- return true ;
258- } else if (!object .toString ().split (" " )[0 ].matches ("[A-Za-z0-9_-]+" )) {
255+ if (!object .toString ().split (" " )[0 ].matches ("[A-Za-z0-9_-]+" )) {
259256 Log .error ("Invalid identifier: " + object .toString ().split (" " )[0 ]);
260257 return true ;
261258 }
You can’t perform that action at this time.
0 commit comments