private static boolean isAcceptableNameInt(String workflowName, @Nullable String fieldName, @Nullable ErrorCollection errorCollection) { if (org.apache.commons.lang.StringUtils.isBlank(workflowName)) { addError(errorCollection, fieldName, "admin.errors.you.must.specify.a.workflow.name"); return false; } else if (!StringUtils.isStringAllASCII(workflowName)) { addError(errorCollection, fieldName, "admin.errors.please.use.only.ascii.characters"); return false; } else if (!workflowName.trim().equals(workflowName)) { // JRA-29521 in MSSQL and MySQL (in postgresql and oracle this does not happen) comparison between char and varchar // does not take into account trailing spaces so in those databases 'a' = 'a ' // However those databases returns values for varchar according to ANSI specification with trailing spaces. // Because in JIRA workflow are identified by name when user copied workflow that was only different by // trailing space the java implementation though that this is different name but when OfBizWorkflowDescriptorStore // tried to get the workflow from db it go the original. So when the copy was saved the original was lost // and the data was corrupted. Issues and schema had assigned workflow that no longer exists (the one without space). addError(errorCollection, fieldName, "admin.errors.workflow.name.cannot.contain.leading.or.trailing.whitespaces"); return false; } return true; }
if (!StringUtils.isStringAllASCII(value))