Remove default methods in Factories which throw UnsupportedOperationException
Hi @nikhilnanivadekar ,
Could you explain this removal of the default meditates?
thank you.
Some methods in factories like org.eclipse.collections.api.factory.list.MutableListFactory#ofInitialCapacity have a default implementation which throws. This was added to maintain backwards compatibility and allow contributors to add API features in a minor release. Since we are preparing for major release, I would like to clean up the default implementations by removing these implementations. So, org.eclipse.collections.api.factory.list.MutableListFactory#ofInitialCapacity will look like this:
Current:
default <T> MutableList<T> ofInitialCapacity(int capacity)
{
throw new UnsupportedOperationException("Adding default implementation so as to not break compatibility");
}
Fix:
public <T> MutableList<T> ofInitialCapacity(int capacity)
Hi,
only remove in classes "factory" ?