Sanity check (to return NONE) prevents null pointer exception on the switch() statment.
This commit is contained in:
parent
55de90ec42
commit
88e231f50b
|
@ -49,6 +49,10 @@ public enum CacheConcurrencyStrategy {
|
|||
}
|
||||
|
||||
public static CacheConcurrencyStrategy fromAccessType(AccessType accessType) {
|
||||
if (null == accessType) {
|
||||
return NONE;
|
||||
}
|
||||
|
||||
switch ( accessType ) {
|
||||
case READ_ONLY: {
|
||||
return READ_ONLY;
|
||||
|
|
Loading…
Reference in New Issue