rafaelweingartner commented on a change in pull request #2414:
[CLOUDSTACK-10241] Duplicated file SRs being created in XenServer pools
URL: https://github.com/apache/cloudstack/pull/2414#discussion_r174254978
##########
File path:
plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/Xenserver625StorageProcessor.java
##########
@@ -65,90 +69,181 @@ public Xenserver625StorageProcessor(final
CitrixResourceBase resource) {
super(resource);
}
- protected boolean mountNfs(final Connection conn, final String remoteDir,
String localDir) {
+ private void mountNfs(Connection conn, String remoteDir, String localDir) {
if (localDir == null) {
localDir = "/var/cloud_mount/" +
UUID.nameUUIDFromBytes(remoteDir.getBytes());
}
-
- final String results = hypervisorResource.callHostPluginAsync(conn,
"cloud-plugin-storage", "mountNfsSecondaryStorage", 100 * 1000, "localDir",
localDir, "remoteDir",
- remoteDir);
-
- if (results == null || results.isEmpty()) {
+ String result = hypervisorResource.callHostPluginAsync(conn,
"cloud-plugin-storage", "mountNfsSecondaryStorage", 100 * 1000, "localDir",
localDir, "remoteDir", remoteDir);
Review comment:
Of course, they are. However, here and in a lot of places in ACS, there is
an indiscriminate use of the final keyword. It does not harm, but it is
something I have to read when reviewing/coding, which does not aggregate/help.
So, I remove when they are not needed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services