Skip to content

Commit

Permalink
불필요한 코드 수정함
Browse files Browse the repository at this point in the history
  • Loading branch information
frankyoh committed Aug 8, 2019
1 parent b6f5994 commit c51aba1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
11 changes: 2 additions & 9 deletions src/main/java/com/mycompany/myapp/aop/logging/LoggingAspect.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@
*
* By default, it only runs with the "dev" profile.
*/
@Slf4j
@Aspect
public class LoggingAspect {

private final Logger log = LoggerFactory.getLogger(this.getClass());

private final Environment env;

public LoggingAspect(Environment env) {
Expand Down Expand Up @@ -83,12 +81,7 @@ public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable {
joinPoint.getSignature().getName(), Arrays.toString(joinPoint.getArgs()));
}
try {
Object result = joinPoint.proceed();
if (log.isDebugEnabled()) {
log.debug("Exit: {}.{}() with result = {}", joinPoint.getSignature().getDeclaringTypeName(),
joinPoint.getSignature().getName(), result);
}
return result;
//debug
} catch (IllegalArgumentException e) {
log.error("Illegal argument: {} in {}.{}()", Arrays.toString(joinPoint.getArgs()),
joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ public class AuditEventConverter {
* @return the converted list.
*/
public List<AuditEvent> convertToAuditEvent(Iterable<PersistentAuditEvent> persistentAuditEvents) {
if (persistentAuditEvents == null) {
return Collections.emptyList();
}
List<AuditEvent> auditEvents = new ArrayList<>();
for (PersistentAuditEvent persistentAuditEvent : persistentAuditEvents) {
auditEvents.add(convertToAuditEvent(persistentAuditEvent));
Expand All @@ -35,11 +32,6 @@ public List<AuditEvent> convertToAuditEvent(Iterable<PersistentAuditEvent> persi
* @return the converted list.
*/
public AuditEvent convertToAuditEvent(PersistentAuditEvent persistentAuditEvent) {
if (persistentAuditEvent == null) {
return null;
}
return new AuditEvent(persistentAuditEvent.getAuditEventDate(), persistentAuditEvent.getPrincipal(),
persistentAuditEvent.getAuditEventType(), convertDataToObjects(persistentAuditEvent.getData()));
}

/**
Expand Down

0 comments on commit c51aba1

Please sign in to comment.