Zsombor Gegesy created RANGER-1371:
--------------------------------------
Summary: No need to write field initializers for default values,
and types where the diamond operator could suffice
Key: RANGER-1371
URL: https://issues.apache.org/jira/browse/RANGER-1371
Project: Ranger
Issue Type: Improvement
Components: Ranger
Reporter: Zsombor Gegesy
Assignee: Zsombor Gegesy
Lot's of places the fields are initialized to their default values, which is
unnecessary verbose:
{code}
long value = 0L;
String str = null;
{code}
which is equivalent with:
{code}
long value;
String str;
{code}
And similarly the type specification can be omitted, as the compiler can
calculate it automatically, so instead of
{code}
List<RangerPolicyConditionDef> conditions = new
ArrayList<RangerServiceDef.RangerPolicyConditionDef>();
{code}
it is suffice to write:
{code}
List<RangerPolicyConditionDef> conditions = new ArrayList<>();
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)