File tree 2 files changed +2
-2
lines changed
main/java/uk/gov/gchq/gaffer/commonutil
test/java/uk/gov/gchq/gaffer/commonutil
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 23
23
* Utility methods for Schema Properties.
24
24
*/
25
25
public final class PropertiesUtil {
26
- private static final Pattern PROPERTY_ALLOWED_CHARACTERS = Pattern .compile ("[a-zA-Z0-9|-]* " );
26
+ private static final Pattern PROPERTY_ALLOWED_CHARACTERS = Pattern .compile ("[a-zA-Z0-9|\\ -]+ " );
27
27
28
28
private PropertiesUtil () {
29
29
// Private constructor to prevent instantiation.
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ class PropertiesUtilTest {
30
30
void shouldThrowExceptionWithInvalidStringName () {
31
31
assertThatIllegalArgumentException ()
32
32
.isThrownBy (() -> PropertiesUtil .validateName (INVALID_STRING ))
33
- .withMessage ("Property is invalid: inv@l1dStr|ng&^, it must match regex: [a-zA-Z0-9|-]* " );
33
+ .withMessage ("Property is invalid: inv@l1dStr|ng&^, it must match regex: [a-zA-Z0-9|\\ -]+ " );
34
34
}
35
35
36
36
@ Test
You can’t perform that action at this time.
0 commit comments