HHH-17494 Metamodel generator produce an uncompilable class when an EntityGraph name contains a comma
This commit is contained in:
parent
ee43bb51b9
commit
1d956eb400
|
@ -99,7 +99,7 @@ public final class StringUtil {
|
|||
}
|
||||
|
||||
public static String nameToMethodName(String name) {
|
||||
return name.replaceAll("[\\s.\\-!@#%=+/*^&|(){}\\[\\]]", "_");
|
||||
return name.replaceAll("[\\s.\\-!@#%=+/*^&|(){}\\[\\],]", "_");
|
||||
}
|
||||
|
||||
public static String getUpperUnderscoreCaseFromLowerCamelCase(String lowerCamelCaseString){
|
||||
|
|
|
@ -41,4 +41,9 @@ public class StringUtilTest {
|
|||
public void testGetUpperUnderscoreCaseFromLowerCamelCase(){
|
||||
assertEquals("USER_PARENT_NAME", StringUtil.getUpperUnderscoreCaseFromLowerCamelCase("userParentName"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNameToMethodNameWithComma() {
|
||||
assertEquals( "entity_Graph", StringUtil.nameToMethodName( "entity,Graph" ) );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue