Page 1 of 1

redundant specification of type arguments

Posted: Thu Apr 04, 2013 5:17 pm
by daemon

Code: Select all

    public ArrayList<L2ProductItemComponent> getComponents()    {        if (_components == null)        {            _components = new ArrayList<L2ProductItemComponent>(); //redundant specification of type arguments <L2ProductItemComponent>        }                return _components;    }
Eclipse gets notification: redundant specification of type arguments <L2ProductItemComponent>

What way should i modify the code not to get this notification anymore?

Re: redundant specification of type arguments

Posted: Thu Apr 04, 2013 5:19 pm
by UnAfraid
daemon wrote:

Code: Select all

    public ArrayList<L2ProductItemComponent> getComponents()    {        if (_components == null)        {            _components = new ArrayList<L2ProductItemComponent>(); //redundant specification of type arguments <L2ProductItemComponent>        }                return _components;    }
Eclipse gets notification: redundant specification of type arguments <L2ProductItemComponent>

What way should i modify the code not to get this notification anymore?

Code: Select all

_components = new ArrayList<>();

Re: redundant specification of type arguments

Posted: Thu Apr 04, 2013 5:21 pm
by daemon
Thanks