@@ -6058,11 +6058,11 @@ else if(children.size() > 0)
60586058
60596059 // If this experiment has been submitted show the submission requests
60606060 List <JournalSubmission > jsList = SubmissionManager .getAllJournalSubmissions (exptAnnotations );
6061- if (jsList .size () > 0 && getContainer ().hasPermission (getUser (), AdminPermission .class ))
6061+ if (! jsList .isEmpty () && getContainer ().hasPermission (getUser (), AdminPermission .class ))
60626062 {
60636063 QuerySettings qSettings = new QuerySettings (getViewContext (), "Submission" , "Submission" );
60646064 qSettings .setBaseFilter (new SimpleFilter (new SimpleFilter .InClause (FieldKey .fromParts ("JournalExperimentId" ),
6065- jsList .stream ().map (js -> js . getJournalExperimentId () ).collect (Collectors .toList ()))));
6065+ jsList .stream ().map (JournalSubmission :: getJournalExperimentId ).collect (Collectors .toList ()))));
60666066 QueryView submissionList = new QueryView (new PanoramaPublicSchema (getUser (), getContainer ()), qSettings , errors );
60676067 submissionList .setShowRecordSelectors (false );
60686068 submissionList .setButtonBarPosition (DataRegion .ButtonBarPosition .TOP );
@@ -6102,7 +6102,7 @@ public void addNavTrail(NavTree root)
61026102 public static class ExperimentAnnotationsDetails
61036103 {
61046104 private final ExperimentAnnotations _experimentAnnotations ;
6105- private JournalSubmission _lastSubmittedRecord ;
6105+ private final JournalSubmission _lastSubmittedRecord ;
61066106 private final boolean _fullDetails ;
61076107 private boolean _canPublish ;
61086108 private String _version ;
@@ -6590,7 +6590,7 @@ public void validateCommand(DeleteExperimentAnnotationsForm deleteForm, Errors e
65906590 {
65916591 errors .reject (ERROR_MSG , "Could not find an experiment with ID " + _experimentAnnotationsId );
65926592 }
6593- if (_expAnnotations .isJournalCopy () && _expAnnotations .isFinal ())
6593+ else if (_expAnnotations .isJournalCopy () && _expAnnotations .isFinal ())
65946594 {
65956595 errors .reject (ERROR_MSG , "Experiment cannot be deleted. It is public and is associated with a publication." );
65966596 }
0 commit comments