Skip to content

Commit

Permalink
Fixed Checkstye warnings, updated licence headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-Draeger committed Feb 14, 2024
1 parent 04eaffb commit f424d2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This Source Code Form is subject to the terms of the MIT License.
* Copyright (c) 2023 Draegerwerk AG & Co. KGaA.
* Copyright (c) 2023, 2024 Draegerwerk AG & Co. KGaA.
*
* SPDX-License-Identifier: MIT
*/
Expand Down Expand Up @@ -530,7 +530,7 @@ public RemoteMdibAccess applyReportOnStorage(final RemoteMdibAccess storage, fin
final var reportProcessor = reportProcessorProvider.get();
reportProcessor.startApplyingReportsOnMdib(storage, null);

final var cmp = ImpliedValueUtil.getMdibVersion(storage.getMdibVersion())
var cmp = ImpliedValueUtil.getMdibVersion(storage.getMdibVersion())
.compareTo(ImpliedValueUtil.getReportMdibVersion(report));
if (cmp > 0) {
fail("Cannot apply report older than current storage."
Expand Down Expand Up @@ -560,6 +560,7 @@ public RemoteMdibAccess applyReportOnStorage(final RemoteMdibAccess storage, fin
// other reports do not modify the Mdib and hence cannot be passed into
// reportProcessor.processReport().
// simply ignore them.
cmp = cmp; // make Checkstyle happy
}
return storage;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This Source Code Form is subject to the terms of the MIT License.
* Copyright (c) 2023 Draegerwerk AG & Co. KGaA.
* Copyright (c) 2023, 2024 Draegerwerk AG & Co. KGaA.
*
* SPDX-License-Identifier: MIT
*/
Expand Down Expand Up @@ -921,18 +921,18 @@ void testUniqueEpisodicReportBasedHistoryFailInvalidateTestRunWhenSameReportType
void testApplyReportOnStorageBadCalledWithOperationInvokedReport() throws ReportProcessingException, PreprocessingException {

// given
BigInteger numericMdibVersion = BigInteger.ZERO;
String sequenceId = "abc";
final BigInteger numericMdibVersion = BigInteger.ZERO;
final String sequenceId = "abc";
final MdibVersion mdibVersion = new MdibVersion(sequenceId, numericMdibVersion);
final var mockObserver = mock(TestRunObserver.class);
final var historianUnderTest = historianFactory.createMdibHistorian(storage, mockObserver);
final var report = new OperationInvokedReport();
final var reportParts = new ArrayList();
final var reportParts = new ArrayList<OperationInvokedReport.ReportPart>();
final RemoteMdibAccess mdibAccess = mock(RemoteMdibAccess.class);
reportParts.add(new OperationInvokedReport.ReportPart());
report.setReportPart(reportParts);
report.setMdibVersion(numericMdibVersion);
report.setSequenceId(sequenceId);
RemoteMdibAccess mdibAccess = mock(RemoteMdibAccess.class);

when(mdibAccess.getMdibVersion()).thenReturn(mdibVersion);

Expand Down

0 comments on commit f424d2f

Please sign in to comment.