[ 
https://issues.apache.org/jira/browse/RANGER-1377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zsombor Gegesy updated RANGER-1377:
-----------------------------------
    Affects Version/s: 0.7.0

> Improve codestyle, java api usage
> ---------------------------------
>
>                 Key: RANGER-1377
>                 URL: https://issues.apache.org/jira/browse/RANGER-1377
>             Project: Ranger
>          Issue Type: Improvement
>          Components: Ranger
>    Affects Versions: 0.7.0
>            Reporter: Zsombor Gegesy
>            Assignee: Zsombor Gegesy
>              Labels: code-cleanup
>             Fix For: 1.0.0
>
>
> There are several generally considered best practice writing Java code, it is 
> better to follow them.
> Instead of:
> * var.equals("somestring") use "somestring".equals(var)
> * collection.size() > 0 use !collection.isEmpty()
> * instead of using a for loop to add items to a collection, use 'addAll'
> * str.indexOf("something") >= 0 use str.contains("something")
> * "" + var use String.valueOf(var)
> * stringBuilder.append("a" + b + "c") use 
> stringBuilder.append("a").append(b).append("c")
> * "something "+ a.toString() use "something " + a



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to