Tal Liron created LOG4J2-472:
--------------------------------
Summary: BaseConfiguration class does not properly implement
Configuration interface
Key: LOG4J2-472
URL: https://issues.apache.org/jira/browse/LOG4J2-472
Project: Log4j 2
Issue Type: Bug
Components: Configurators
Affects Versions: 2.0-beta9
Reporter: Tal Liron
Priority: Minor
The problem is the getComponent method. In Configuration, it's defined so:
{code}
<T> T getComponent(String name);
{code}
But in BaseConfiguration, it is overridden like this:
{code}
@Override
public Object getComponent(final String name)
{code}
When I compile against log4j with lint, I get this warning:
{code}
[javac] public class MyConfiguration extends BaseConfiguration
[javac] ^
[javac] return type requires unchecked conversion from Object to T
[javac] where T is a type-variable:
[javac] T extends Object declared in method <T>getComponent(String)
{code}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]