Skip to content

Commit 778638a

Browse files
committed
Make strings static finals to comply with SonarQube reported code practices.
1 parent 2344f08 commit 778638a

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

service/src/main/java/org/folio/rest/workflow/controller/WorkflowController.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ public class WorkflowController {
3636

3737
private static final Log LOG = LogFactory.getLog(WorkflowController.class);
3838

39+
private static final String REGX_NOT_GRAPH = "[^\\p{C}]";
40+
private static final String REGX_EOL = "[\r\n]";
41+
3942
private WorkflowEngineService workflowEngineService;
4043

4144
private WorkflowCqlService workflowCqlService;
@@ -162,8 +165,8 @@ private String sanitize(String param) {
162165
if (param == null) return "";
163166

164167
return param
165-
.replaceAll("[^\\p{C}]", "")
166-
.replaceAll("[\r\n]", " ");
168+
.replaceAll(REGX_NOT_GRAPH, "")
169+
.replaceAll(REGX_EOL, " ");
167170
}
168171

169172
/**

0 commit comments

Comments
 (0)