Skip to content

Commit c410908

Browse files
committed
commit to test in sonarqube
1 parent 72aeb9b commit c410908

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: core/common-util/src/main/java/uk/gov/gchq/gaffer/commonutil/PropertiesUtil.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* Utility methods for Schema Properties.
2424
*/
2525
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|\\-]+");
2727

2828
private PropertiesUtil() {
2929
// Private constructor to prevent instantiation.

Diff for: core/common-util/src/test/java/uk/gov/gchq/gaffer/commonutil/PropertiesUtilTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class PropertiesUtilTest {
3030
void shouldThrowExceptionWithInvalidStringName() {
3131
assertThatIllegalArgumentException()
3232
.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|\\-]+");
3434
}
3535

3636
@Test

0 commit comments

Comments
 (0)