-
Notifications
You must be signed in to change notification settings - Fork 5k
Composite builds: internal instantiation cosmetics #14945
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Also some cosmetics - diamond operator, lambdas.
@rieske the public interface All DSL types should be instantiated by the instantiator for Groovy DSL conveniences we do by instrumenting the class. At the moment it has no practical advantage, because the interface does not have any Action/Closure taking method or properties method. But if it would have e.g.:
Then this would stop working for example and you would have to do:
Another example that would stop working I think tis the I think we should still keep using the instantiator here. |
Thanks! I'll revert the commit with instantiator then. |
…ntiator" This reverts commit dff0d12.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for cleaning up!
What's the rationale for direct instantiation of Java collections without Guava? Should we apply it everywhere? |
Those Guava helpers were mostly for Java 6 and became obsolete with Java 7 and later. The javadoc for those factory methods says:
And in general - if it is equally convenient to achieve something natively without relying on an external library, I think native should be the preference. |
I see. Thanks, @rieske. |
Cosmetics: