Code Review
/
portal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Tests coverage up and some minor bug fixes
[portal.git]
/
portal-BE
/
src
/
main
/
java
/
org
/
onap
/
portal
/
aop
/
service
/
FnUserServiceAOP.java
diff --git
a/portal-BE/src/main/java/org/onap/portal/aop/service/FnUserServiceAOP.java
b/portal-BE/src/main/java/org/onap/portal/aop/service/FnUserServiceAOP.java
index
84f430e
..
65fc88d
100644
(file)
--- a/
portal-BE/src/main/java/org/onap/portal/aop/service/FnUserServiceAOP.java
+++ b/
portal-BE/src/main/java/org/onap/portal/aop/service/FnUserServiceAOP.java
@@
-62,14
+62,11
@@
public class FnUserServiceAOP {
private final DataValidator dataValidator;
private final FnUserMapper fnUserMapper;
private final DataValidator dataValidator;
private final FnUserMapper fnUserMapper;
- private final FnUserService fnUserService;
@Autowired
@Autowired
- public FnUserServiceAOP(final DataValidator dataValidator, final FnUserMapper fnUserMapper,
- final FnUserService fnUserService) {
+ public FnUserServiceAOP(final DataValidator dataValidator, final FnUserMapper fnUserMapper) {
this.dataValidator = dataValidator;
this.fnUserMapper = fnUserMapper;
this.dataValidator = dataValidator;
this.fnUserMapper = fnUserMapper;
- this.fnUserService = fnUserService;
}
@Before("execution(* org.onap.portal.service.fn.FnUserService.saveFnUser(..)) && args(principal, fnUser)")
}
@Before("execution(* org.onap.portal.service.fn.FnUserService.saveFnUser(..)) && args(principal, fnUser)")
@@
-82,6
+79,7
@@
public class FnUserServiceAOP {
try {
user = fnUserMapper.fnUserToFnUser(fnUser);
} catch (NullPointerException e) {
try {
user = fnUserMapper.fnUserToFnUser(fnUser);
} catch (NullPointerException e) {
+ LOGGER.error("NullPointerException occured", e);
throw new NullPointerException(e.getLocalizedMessage() + ", " + e.getMessage());
}
throw new NullPointerException(e.getLocalizedMessage() + ", " + e.getMessage());
}
@@
-92,7
+90,7
@@
public class FnUserServiceAOP {
LOGGER.error("User " + principal.getName() + " try to save not valid fnUser: " + violations);
throw new IllegalArgumentException("FnUser is not valid, " + violations);
} else {
LOGGER.error("User " + principal.getName() + " try to save not valid fnUser: " + violations);
throw new IllegalArgumentException("FnUser is not valid, " + violations);
} else {
- LOGGER.
error
("User " + principal.getName() + " send valid fnUser");
+ LOGGER.
info
("User " + principal.getName() + " send valid fnUser");
}
}
}
}
}
}