Skip to content

Commit

Permalink
remove unnecessary annos (idea 2024.2 bug)
Browse files Browse the repository at this point in the history
  • Loading branch information
vananiev committed Oct 22, 2024
1 parent 70d0265 commit 1406f9c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,9 @@ public Arguments.ArgumentsBuilder argumentsBuilder() {
*/
public Result parse(Arguments arg) {

@SuppressWarnings("DataFlowIssue")
@Nullable BigDecimal brokerFee = getFee(arg.row, arg.brokerFeeColumn).orElse(null);
@SuppressWarnings("DataFlowIssue")
@Nullable BigDecimal marketFee = getFee(arg.row, arg.marketFeeColumn).orElse(null);
@SuppressWarnings("DataFlowIssue")
@Nullable BigDecimal clearingFee = getFee(arg.row, arg.clearingFeeColumn).orElse(null);
@SuppressWarnings("DataFlowIssue")
@Nullable BigDecimal stampDuty = getFee(arg.row, arg.stampDutyColumn).orElse(null);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

package ru.investbook.parser.psb;

import org.checkerframework.checker.nullness.qual.Nullable;
import org.spacious_team.broker.pojo.Security;
import org.spacious_team.broker.pojo.SecurityQuote;
import org.spacious_team.table_wrapper.api.TableRow;
Expand All @@ -38,7 +39,7 @@ public SecurityQuoteTable(PsbBrokerReport report) {
}

@Override
protected SecurityQuote parseRow(TableRow row) {
protected @Nullable SecurityQuote parseRow(TableRow row) {
if (row.rowContains(SecuritiesTable.INVALID_TEXT)) {
return null;
}
Expand All @@ -48,9 +49,9 @@ protected SecurityQuote parseRow(TableRow row) {
}
String isin = row.getStringCellValue(ISIN);
BigDecimal amount = row.getBigDecimalCellValue(AMOUNT);
BigDecimal price = amount.divide(BigDecimal.valueOf(count), 4, RoundingMode.HALF_UP);
@Nullable BigDecimal price = amount.divide(BigDecimal.valueOf(count), 4, RoundingMode.HALF_UP);
BigDecimal quote = row.getBigDecimalCellValue(QUOTE);
BigDecimal accruedInterest = row.getBigDecimalCellValue(ACCRUED_INTEREST)
@Nullable BigDecimal accruedInterest = row.getBigDecimalCellValue(ACCRUED_INTEREST)
.divide(BigDecimal.valueOf(count), 2, RoundingMode.HALF_UP);
String currency = row.getStringCellValue(CURRENCY);
if (accruedInterest.compareTo(minValue) < 0 && price.subtract(quote).abs().compareTo(minValue) < 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ private static String getPortfolio(ReportPage reportPage) {
//noinspection DataFlowIssue
for (@Nullable TableCell cell : reportPage.getRow(address.getRow())) {
if (cell != null && cell.getColumnIndex() > address.getColumn()) {
@SuppressWarnings("DataFlowIssue")
@Nullable Object value = cell.getValue();
if (value instanceof String) {
return value.toString()
Expand Down

0 comments on commit 1406f9c

Please sign in to comment.