ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doroszlai, Attila" <>
Subject Re: IDE setup required on branch-feature-AMBARI-14714
Date Thu, 01 Mar 2018 21:43:36 GMT

Your concern is valid, however please consider:

 * The way FreeBuilder is invoked by Maven/Eclipse/IDEA is not a
custom plugin.  Annotation processing is a standard part of the Java
compiler.  Eclipse or IntelliJ cannot simply stop supporting it.

 * We do have the code generated by FreeBuilder.  Ambari can decide at
any time to stop using FreeBuilder, and keep the code generated so
far. (3rd item)

 * Ambari depends way deeper on Guice for example, which is also a
3rd-party library.  Yes, maybe the code would compile after removing
all the Guice-specific code, but it would not work without manually
passing all the instances that are now injected.


By boilerplate I mean:

 * proper equals/hashCode/toString implementations for simple data
objects (eg. *Request classes in Ambari)
 * code duplication when you want almost identical instances eg. for
unit tests
 * unnecessary code when you don't need all properties of some object
for the test, but have to specify them anyway
 * unless you create chained constructors for the previous case

All these cases can be implemented more easily, in more readable and
less fragile ways using FreeBuilder (and some other similar


View raw message