File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/main/java/org/audit4j/core Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 20
20
21
21
import java .lang .reflect .Method ;
22
22
23
+ import org .audit4j .core .annotation .AuditAnnotationAttributes ;
23
24
import org .audit4j .core .dto .AuditEvent ;
24
25
import org .audit4j .core .io .AnnotationAuditOutputStream ;
25
26
import org .audit4j .core .io .AsyncAuditOutputStream ;
@@ -93,7 +94,10 @@ public boolean audit(AuditEvent event) {
93
94
* @return true, if successful
94
95
*/
95
96
public boolean audit (Class <?> clazz , Method method , Object [] args ) {
96
- annotationStream .write (clazz , method , args );
97
+ final AuditAnnotationAttributes auditAttributes = new AuditAnnotationAttributes ();
98
+ if (auditAttributes .hasAnnotation (clazz ) || auditAttributes .hasAnnotation (method )) {
99
+ annotationStream .write (clazz , method , args );
100
+ }
97
101
return true ;
98
102
}
99
103
You can’t perform that action at this time.
0 commit comments