Skip to content

Commit 581f3b7

Browse files
KC Wangkaruturi
authored andcommitted
findbugs and PMD fixes
This closes #168 Signed-off-by: Rajani Karuturi <[email protected]>
1 parent 9836ccd commit 581f3b7

31 files changed

+314
-311
lines changed

plugins/network-elements/bigswitch/src/com/cloud/agent/api/BcfAnswer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@
2222
public class BcfAnswer extends Answer{
2323
private final String hash;
2424

25-
public BcfAnswer(Command command, boolean success, String details) {
25+
public BcfAnswer(final Command command, final boolean success, final String details) {
2626
super(command, success, details);
2727
this.hash = "";
2828
}
2929

30-
public BcfAnswer(Command command, boolean success, String details, String hash) {
30+
public BcfAnswer(final Command command, final boolean success, final String details, final String hash) {
3131
super(command, success, details);
3232
this.hash = hash;
3333
}
3434

35-
public BcfAnswer(Command command, Exception e) {
35+
public BcfAnswer(final Command command, final Exception e) {
3636
super(command, e);
3737
this.hash = "";
3838
}

plugins/network-elements/bigswitch/src/com/cloud/agent/api/BcfCommand.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import com.cloud.network.bigswitch.TopologyData;
2323

2424
public class BcfCommand extends Command {
25-
private TopologyData topology = null;
26-
private boolean _topologySyncRequested = false;
25+
private TopologyData topology;
26+
private boolean topologySyncRequested;
2727

2828
@Override
2929
public boolean executeInSequence() {
@@ -34,15 +34,15 @@ public TopologyData getTopology() {
3434
return topology;
3535
}
3636

37-
public void setTopology(TopologyData topology) {
37+
public void setTopology(final TopologyData topology) {
3838
this.topology = topology;
3939
}
4040

41-
public boolean is_topologySyncRequested() {
42-
return _topologySyncRequested;
41+
public boolean isTopologySyncRequested() {
42+
return topologySyncRequested;
4343
}
4444

45-
public void set_topologySyncRequested(boolean requested) {
46-
this._topologySyncRequested = requested;
45+
public void setTopologySyncRequested(final boolean requested) {
46+
this.topologySyncRequested = requested;
4747
}
4848
}

plugins/network-elements/bigswitch/src/com/cloud/agent/api/CacheBcfTopologyCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
import com.cloud.network.bigswitch.TopologyData;
2323

2424
public class CacheBcfTopologyCommand extends Command{
25-
private final TopologyData topology;
25+
private final TopologyData _topology;
2626

27-
public CacheBcfTopologyCommand(TopologyData topology){
28-
this.topology = topology;
27+
public CacheBcfTopologyCommand(final TopologyData topology){
28+
this._topology = topology;
2929
}
3030

3131
@Override
@@ -34,6 +34,6 @@ public boolean executeInSequence() {
3434
}
3535

3636
public TopologyData getTopology() {
37-
return topology;
37+
return _topology;
3838
}
3939
}

plugins/network-elements/bigswitch/src/com/cloud/agent/api/CreateBcfAttachmentCommand.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@
2020
package com.cloud.agent.api;
2121

2222
public class CreateBcfAttachmentCommand extends BcfCommand {
23-
private String _tenantId;
24-
private String _tenantName;
25-
private String _networkId;
26-
private String _portId;
27-
private String _nicId;
28-
private Integer _vlan;
29-
private String _ipv4;
30-
private String _mac;
23+
private final String _tenantId;
24+
private final String _tenantName;
25+
private final String _networkId;
26+
private final String _portId;
27+
private final String _nicId;
28+
private final Integer _vlan;
29+
private final String _ipv4;
30+
private final String _mac;
3131

32-
public CreateBcfAttachmentCommand(String tenantId, String tenantName,
33-
String networkId, String portId, String nicId,
34-
Integer vlan, String ipv4, String mac) {
32+
public CreateBcfAttachmentCommand(final String tenantId, final String tenantName,
33+
final String networkId, final String portId, final String nicId,
34+
final Integer vlan, final String ipv4, final String mac) {
3535
this._tenantId = tenantId;
3636
this._tenantName = tenantName;
3737
this._networkId = networkId;

plugins/network-elements/bigswitch/src/com/cloud/agent/api/CreateBcfRouterCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
public class CreateBcfRouterCommand extends BcfCommand {
2323
private final String _tenantId;
2424

25-
public CreateBcfRouterCommand(String tenantId){
25+
public CreateBcfRouterCommand(final String tenantId){
2626
this._tenantId = tenantId;
2727
}
2828

29-
public String get_tenantId() {
29+
public String getTenantId() {
3030
return _tenantId;
3131
}
3232
}

plugins/network-elements/bigswitch/src/com/cloud/agent/api/CreateBcfRouterInterfaceCommand.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,32 @@ public class CreateBcfRouterInterfaceCommand extends BcfCommand{
2626
private final String _gateway;
2727
private final String _networkName;
2828

29-
public CreateBcfRouterInterfaceCommand(String tenantId, String networkId, String cidr,
30-
String gateway, String networkName){
29+
public CreateBcfRouterInterfaceCommand(final String tenantId, final String networkId,
30+
final String cidr, final String gateway, final String networkName){
3131
this._tenantId = tenantId;
3232
this._networkId = networkId;
3333
this._networkName = networkName;
3434
this._cidr = cidr;
3535
this._gateway = gateway;
3636
}
3737

38-
public String get_tenantId() {
38+
public String getTenantId() {
3939
return _tenantId;
4040
}
4141

42-
public String get_networkId() {
42+
public String getNetworkId() {
4343
return _networkId;
4444
}
4545

46-
public String get_networkName() {
46+
public String getNetworkName() {
4747
return _networkName;
4848
}
4949

50-
public String get_cidr() {
50+
public String getCidr() {
5151
return _cidr;
5252
}
5353

54-
public String get_gateway() {
54+
public String getGateway() {
5555
return _gateway;
5656
}
5757
}

plugins/network-elements/bigswitch/src/com/cloud/agent/api/CreateBcfSegmentCommand.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
package com.cloud.agent.api;
2121

2222
public class CreateBcfSegmentCommand extends BcfCommand {
23-
private String _tenantId;
24-
private String _tenantName;
25-
private String _networkId;
26-
private String _networkName;
27-
private Integer _vlan;
28-
29-
public CreateBcfSegmentCommand(String tenantId, String tenantName,
30-
String networkId, String networkName, Integer vlan) {
23+
private final String _tenantId;
24+
private final String _tenantName;
25+
private final String _networkId;
26+
private final String _networkName;
27+
private final Integer _vlan;
28+
29+
public CreateBcfSegmentCommand(final String tenantId, final String tenantName,
30+
final String networkId, final String networkName, final Integer vlan) {
3131
this._tenantId = tenantId;
3232
this._tenantName = tenantName;
3333
this._networkId = networkId;

plugins/network-elements/bigswitch/src/com/cloud/agent/api/CreateBcfStaticNatCommand.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,32 @@ public class CreateBcfStaticNatCommand extends BcfCommand {
2626
private final String _publicIp;
2727
private final String _mac;
2828

29-
public CreateBcfStaticNatCommand(String tenantId, String networkId,
30-
String privateIp, String publicIp, String mac){
29+
public CreateBcfStaticNatCommand(final String tenantId, final String networkId,
30+
final String privateIp, final String publicIp, final String mac){
3131
this._tenantId = tenantId;
3232
this._networkId = networkId;
3333
this._privateIp = privateIp;
3434
this._publicIp = publicIp;
3535
this._mac = mac;
3636
}
3737

38-
public String get_tenantId() {
38+
public String getTenantId() {
3939
return _tenantId;
4040
}
4141

42-
public String get_networkId() {
42+
public String getNetworkId() {
4343
return _networkId;
4444
}
4545

46-
public String get_privateIp() {
46+
public String getPrivateIp() {
4747
return _privateIp;
4848
}
4949

50-
public String get_publicIp() {
50+
public String getPublicIp() {
5151
return _publicIp;
5252
}
5353

54-
public String get_mac() {
54+
public String getMac() {
5555
return _mac;
5656
}
5757
}

plugins/network-elements/bigswitch/src/com/cloud/agent/api/DeleteBcfAttachmentCommand.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
package com.cloud.agent.api;
2121

2222
public class DeleteBcfAttachmentCommand extends BcfCommand {
23-
private String _tenantId;
24-
private String _networkId;
25-
private String _attachmentId;
23+
private final String _tenantId;
24+
private final String _networkId;
25+
private final String _attachmentId;
2626

27-
public DeleteBcfAttachmentCommand(String tenantId,
28-
String networkId, String attachmentId) {
27+
public DeleteBcfAttachmentCommand(final String tenantId,
28+
final String networkId, final String attachmentId) {
2929
this._tenantId = tenantId;
3030
this._networkId = networkId;
3131
this._attachmentId = attachmentId;

plugins/network-elements/bigswitch/src/com/cloud/agent/api/DeleteBcfSegmentCommand.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@
2121

2222
public class DeleteBcfSegmentCommand extends BcfCommand {
2323

24-
private String _tenantUuid;
25-
private String _networkUuid;
24+
private final String _tenantUuid;
25+
private final String _networkUuid;
2626

27-
public DeleteBcfSegmentCommand(String tenantUuid, String networkUuid) {
27+
public DeleteBcfSegmentCommand(final String tenantUuid, final String networkUuid) {
2828
this._tenantUuid = tenantUuid;
2929
this._networkUuid = networkUuid;
3030
}
3131

32-
public String get_tenantUuid() {
32+
public String getTenantUuid() {
3333
return _tenantUuid;
3434
}
3535

3636
public String getNetworkUuid() {
3737
return _networkUuid;
3838
}
39-
}
39+
}

0 commit comments

Comments
 (0)