Closed agadek closed 1 year ago
I'd like to porpose simple code fix:
/**
remove from the string the quote and double quote. * @param value string to pure: "my/text" @return unquoted string: my/text */ private String cleanString(String value) { if (value == null) { return null; } if (value.isEmpty()) { return value; } char[] tmp = value.toCharArray(); if ((tmp[0] == '"' && tmp[value.length() - 1] == '"') || (tmp[0] == '\'' && tmp[value.length() - 1] == '\'')) { if (value.length() != 1) { value = value.substring(1, value.length() - 1); } else { value = ""; } } return value; }
Now, method throws string out of boundary exception in case of string with single quote sinse like ' or "
This can be closed, this is not the case with the current version of java-grok. This probably was fixed by 8a8234af500876d3ed3eede4c63f587f6f9e2b14 from @hayatbehlim .
I'd like to porpose simple code fix:
/**
Now, method throws string out of boundary exception in case of string with single quote sinse like ' or "