From 5c5b19ba40f1448168bb8c6754b3f8f0fda4f443 Mon Sep 17 00:00:00 2001 From: Stephen Kraffmiller Date: Thu, 11 Jan 2018 13:26:17 -0500 Subject: [PATCH] #4393 fixes from code review --- .../java/edu/harvard/iq/dataverse/FileDownloadHelper.java | 6 +++--- src/main/webapp/file-download-popup-fragment.xhtml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/FileDownloadHelper.java b/src/main/java/edu/harvard/iq/dataverse/FileDownloadHelper.java index 2a388fb95ca..bc081a5d555 100644 --- a/src/main/java/edu/harvard/iq/dataverse/FileDownloadHelper.java +++ b/src/main/java/edu/harvard/iq/dataverse/FileDownloadHelper.java @@ -161,7 +161,7 @@ private boolean validateGuestbookResponse(GuestbookResponse guestbookResponse){ new FacesMessage(FacesMessage.SEVERITY_ERROR, BundleUtil.getStringFromBundle("dataset.guestbookResponse.guestbook.responseTooLong"), null)); } if (dataset.getGuestbook().isInstitutionRequired()) { - boolean institutionValid = (guestbookResponse.getEmail() != null && !guestbookResponse.getEmail().isEmpty()); + boolean institutionValid = (guestbookResponse.getInstitution()!= null && !guestbookResponse.getInstitution().isEmpty()); if (!institutionValid) { institutionField.setValid(false); FacesContext.getCurrentInstance().addMessage(institutionField.getClientId(), @@ -169,14 +169,14 @@ private boolean validateGuestbookResponse(GuestbookResponse guestbookResponse){ } valid &= institutionValid; } - valid &= testResponseLength(guestbookResponse.getInstitution()); + valid &= testResponseLength(guestbookResponse.getInstitution()); if (! testResponseLength(guestbookResponse.getInstitution())){ institutionField.setValid(false); FacesContext.getCurrentInstance().addMessage(institutionField.getClientId(), new FacesMessage(FacesMessage.SEVERITY_ERROR, BundleUtil.getStringFromBundle("dataset.guestbookResponse.guestbook.responseTooLong"), null)); } if (dataset.getGuestbook().isPositionRequired()) { - boolean positionValid = (guestbookResponse.getEmail() != null && !guestbookResponse.getEmail().isEmpty()); + boolean positionValid = (guestbookResponse.getPosition()!= null && !guestbookResponse.getPosition().isEmpty()); if (!positionValid) { positionField.setValid(false); FacesContext.getCurrentInstance().addMessage(positionField.getClientId(), diff --git a/src/main/webapp/file-download-popup-fragment.xhtml b/src/main/webapp/file-download-popup-fragment.xhtml index f848bc43ef8..2d73daf22c5 100644 --- a/src/main/webapp/file-download-popup-fragment.xhtml +++ b/src/main/webapp/file-download-popup-fragment.xhtml @@ -116,7 +116,7 @@