HHH-14816 Optimise LockMode#fromExternalForm for common case

This commit is contained in:
Sanne Grinovero 2021-10-18 10:33:22 +01:00 committed by Sanne Grinovero
parent 3bee3a1c79
commit 6008264711
1 changed files with 6 additions and 0 deletions

View File

@ -147,6 +147,12 @@ public enum LockMode {
return NONE;
}
for ( LockMode lockMode : LockMode.values() ) {
if ( lockMode.externalForm.equals( externalForm ) ) {
return lockMode;
}
}
for ( LockMode lockMode : LockMode.values() ) {
if ( lockMode.externalForm.equalsIgnoreCase( externalForm ) ) {
return lockMode;