Andrei Ivanov created LOG4J2-2431:
-------------------------------------

             Summary: 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


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)

Reply via email to