Skip to content

Commit

Permalink
Merge pull request #2064 from Mailaender/pdf-report-export
Browse files Browse the repository at this point in the history
Fix a crash at File - Export - Chromatogram Export - PDF
  • Loading branch information
eselmeister authored Jan 28, 2025
2 parents 7e35c30 + 5f565f9 commit a052f2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2024 Lablicate GmbH.
* Copyright (c) 2024, 2025 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -48,7 +48,7 @@ public IProcessingInfo<?> generate(File file, boolean append, IChromatogram<? ex
@Override
public IProcessingInfo<?> generate(File file, boolean append, IChromatogram<? extends IPeak> chromatogram, IProgressMonitor monitor) {

throw new UnsupportedOperationException();
return generate(file, append, chromatogram, new ReportSettings(), monitor);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2012, 2022 Lablicate GmbH.
* Copyright (c) 2012, 2025 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -31,7 +31,7 @@ public IProcessingInfo<File> validate(File file) {
if(file == null) {
return getProcessingInfo("The file couldn't be found.");
}
//

IProcessingInfo<File> processingInfo = createDirectoriesAndFiles(file);
/*
* Tests if the file can be written.
Expand Down Expand Up @@ -77,12 +77,12 @@ private IProcessingInfo<File> createDirectoriesAndFiles(final File file) {
return getProcessingInfo("The given file couldn't be created:" + file.getAbsolutePath());
}
}
return new ProcessingInfo<File>();
return new ProcessingInfo<>();
}

private IProcessingInfo<File> getProcessingInfo(String message) {

IProcessingInfo<File> processingInfo = new ProcessingInfo<File>();
IProcessingInfo<File> processingInfo = new ProcessingInfo<>();
IProcessingMessage processingMessage = new ProcessingMessage(MessageType.ERROR, "Chromatogram Report", message);
processingInfo.addMessage(processingMessage);
return processingInfo;
Expand Down

0 comments on commit a052f2d

Please sign in to comment.