[NEUTRON-52] Better practices Created: 30/Jun/15  Updated: 10/Jun/16  Resolved: 10/Jun/16

Status: Resolved
Project: neutron
Component/s: transcriber
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Shashidhar Shekar Assignee: Abbas P Pareedkunju
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 3902

 Description   

package org.opendaylight.neutron.transcriber;

class : public abstract class AbstractNeutronInterface

1. This can be made final --> private DataBroker db;
2. Class can have a header comment

public class Activator implements BundleActivator

1. can be made final --> private ProviderContext providerContext;
2. As a general practice local variables can be made final

public class NeutronFloatingIPInterface extends

1. can be made final --> private ConcurrentMap<String, NeutronFloatingIP> floatingIPDB = new ConcurrentHashMap<String, NeutronFloatingI
2. unused variable --> NeutronSubnet subnet = subnetCRUD.getSubnet(networkCRUD.getNetwork(floatIP.getFloatingNetworkUUID()).getSubnets().get(0));

public class NeutronLoadBalancerInterface extends

1. can be made final --> private ConcurrentMap<String, eutronLoadBalancer> loadBalancerDB

similar conventions can be verified in other classes



 Comments   
Comment by Abbas P Pareedkunju [ 31/May/16 ]

Hi Shashidhar,

Would you have any idea what the AbstractNeutronInterface.java class is used for, to add to the header comment.

I have already incorporated the other comments. Will send you for the review once I add this aswell.

Thanks,
Abbas

Comment by Abbas P Pareedkunju [ 02/Jun/16 ]

The below patch submitted for review on the Unused Imports across Neutron

https://git.opendaylight.org/gerrit/#/c/39632/

Other changes would be submitted as a different patch as suggested by Isaku Yamahata on the review.

Thanks,
Abbas

Comment by Abbas P Pareedkunju [ 03/Jun/16 ]

https://git.opendaylight.org/gerrit/#/c/39632/
Merged for cleanup of Unused Imports...

Comment by Abbas P Pareedkunju [ 10/Jun/16 ]

Patch to declare local variables to final in transcriber:

https://git.opendaylight.org/gerrit/#/c/39819/

Generated at Wed Feb 07 20:25:25 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.