merging null pointer check from v0.8-uhn-branch to master

This commit is contained in:
lmds1 2014-11-26 10:53:54 -05:00
commit edc00091e8
1 changed files with 2 additions and 0 deletions

View File

@ -388,6 +388,7 @@ public class AuditingInterceptor extends InterceptorAdapter {
* @return the corresponding SecurityEventActionEnum (Read/View/Print, Create, Delete, etc)
*/
protected SecurityEventActionEnum mapResourceTypeToSecurityEventAction(RestfulOperationTypeEnum resourceOperationType) {
if(resourceOperationType == null) return null;
switch (resourceOperationType) {
case READ: return SecurityEventActionEnum.READ_VIEW_PRINT;
case CREATE: return SecurityEventActionEnum.CREATE;
@ -409,6 +410,7 @@ public class AuditingInterceptor extends InterceptorAdapter {
* @return the corresponding SecurityEventObjectLifecycleEnum (Access/Use, Origination/Creation, Logical Deletion, etc)
*/
protected SecurityEventObjectLifecycleEnum mapResourceTypeToSecurityLifecycle(RestfulOperationTypeEnum resourceOperationType) {
if(resourceOperationType == null) return null;
switch (resourceOperationType) {
case READ: return SecurityEventObjectLifecycleEnum.ACCESS_OR_USE;
case CREATE: return SecurityEventObjectLifecycleEnum.ORIGINATION_OR_CREATION;