[NETCONF-50] local variables to be declared final Created: 30/Jun/15  Updated: 15/Mar/19  Resolved: 12/Oct/18

Status: Resolved
Project: netconf
Component/s: netconf
Affects Version/s: None
Fix Version/s: None

Type: Improvement
Reporter: Shashidhar Shekar Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All



 Description   

as a good practice it is better to declare local variables that are assigned only once as final

eg.

class --> public final class NetconfMessageUtil

method --> public static Collection<String> extractCapabilitiesFromHello(Document doc)

variable -->
public static Collection<String> extractCapabilitiesFromHello(Document doc) throws NetconfDocumentedException



 Comments   
Comment by Robert Varga [ 13/Nov/15 ]

Move to NETCONFI project.

Comment by Dhevendran Kulandaivel [ 18/May/16 ]

(In reply to Robert Varga from comment #1)
> Move to NETCONFI project.

Hi Shashidhar Shekar

I can work on this. Can you provide more details. I am not able to see the actual issue you are mentioning (i.e. extractCapabilitiesFromHello() is not local variable) in your example

Thanks & Regards,
Dhevendran K

Comment by Jakub Morvay [ 12/Oct/18 ]

This is already done, see:

https://github.com/opendaylight/netconf/blob/df1a4dbb37e0fb187c6d50d3bab1f9d88b888928/netconf/netconf-util/src/main/java/org/opendaylight/netconf/util/messages/NetconfMessageUtil.java#L69

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