[
https://issues.apache.org/jira/browse/LOG4J2-2431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16624452#comment-16624452
]
ASF subversion and git services commented on LOG4J2-2431:
---------------------------------------------------------
Commit 6d4fcf3356231b7cb6cd25f3b3ea93f35ca49687 in logging-log4j-audit's branch
refs/heads/master from [~aivanov93]
[ https://git-wip-us.apache.org/repos/asf?p=logging-log4j-audit.git;h=6d4fcf3 ]
[LOG4J2-2431] Narrow the return type of getEvent
> Narrow the type returned by LogEventFactory.getEvent
> ----------------------------------------------------
>
> Key: LOG4J2-2431
> URL: https://issues.apache.org/jira/browse/LOG4J2-2431
> Project: Log4j 2
> Issue Type: Improvement
> Components: Log4j-Audit
> Affects Versions: Log4j-Audit 1.0.0
> Reporter: Andrei Ivanov
> Priority: Trivial
>
> Seeing that the result of
> [{{LogEventFactory.getEvent}}|https://github.com/apache/logging-log4j-audit/blob/master/log4j-audit/log4j-audit-api/src/main/java/org/apache/logging/log4j/audit/LogEventFactory.java#L90]
> is always cast to {{AuditEvent}}, I think the definition of the return type
> can be narrowed like this:
> {code:java}
> public static <T extends AuditEvent> T getEvent(Class<T> intrface)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)