[
https://issues.apache.org/jira/browse/LOG4J2-2431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16624454#comment-16624454
]
ASF GitHub Bot commented on LOG4J2-2431:
----------------------------------------
Github user asfgit closed the pull request at:
https://github.com/apache/logging-log4j-audit/pull/3
> 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)