Change in ovirt-engine[master]: core: use filePath.toFile().exists() instead of File.exists()

Code Review gerrit at ovirt.org
Tue Nov 1 12:34:50 UTC 2016


>From Allon Mureinik <amureini at redhat.com>:

Allon Mureinik has submitted this change and it was merged.

Change subject: core: use filePath.toFile().exists() instead of File.exists()
......................................................................


core: use filePath.toFile().exists() instead of File.exists()

Probably not critical, but it is good practice to use
`toFile().exists()` because the Files.exists() method can lead to
unexpected poor performance on Java 8 [1],[2].

[1] https://sonarqube.com/coding_rules#rule_key=squid%3AS3725
[2] https://bugs.openjdk.java.net/browse/JDK-8153414

Change-Id: I7049f2bdf16368f202f78cf2e9da9dff35fc74ba
Signed-off-by: Roman Mohr <rmohr at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/IconLoader.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/SysprepHandler.java
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Roman Mohr: Verified
  Jenkins CI: Passed CI tests
  Allon Mureinik: Looks good to me, approved
  Arik Hadas: Looks good to me, but someone else must approve



-- 
To view, visit https://gerrit.ovirt.org/65915
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7049f2bdf16368f202f78cf2e9da9dff35fc74ba
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roman Mohr <rmohr at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Roman Mohr <rmohr at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list