Nir Soffer has posted comments on this change. Change subject: webadmin: Display size of ISO and floppy files in human readable format ......................................................................
Patch Set 4: (2 comments) Looks good except few minor issues - see comments. .................................................... File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/renderer/DiskSizeRenderer.java Line 31: this.format = format; Line 32: } Line 33: Line 34: protected boolean isUnavailable(T size) { Line 35: return size == null || size.longValue() == -1; Can we use constant instead of -1, e.g. IsoDomainListSyncronizer.SIZE_IS_NOT_AVAILABLE? Probably means that the constant should live elsewhere so both classes can us it. Line 36: } Line 37: Line 38: @Override Line 39: public String render(T size) { Line 54: default: Line 55: throw new RuntimeException("Format '" + format + "' is not supported!"); Line 56: } Line 57: Line 58: return res; If we return inside the case clause, we can get rid of the res temporary variable, the breaks and the last return line. switch(format) { case LEGACY: return renderLegacySize(size.longValue()); ... default: throw ... } Line 59: } Line 60: Line 61: private String renderLegacySize(long sizeInBytes) { Line 62: long sizeInGB = SizeConverter.convert(sizeInBytes, SizeConverter.SizeUnit.BYTES, SizeUnit.GB).longValue(); -- To view, visit http://gerrit.ovirt.org/19550 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I95961fde2256a44b8474d8f41562bc0e33b0ad4a Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Sergey Gotliv <sgot...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches