Skip to content

Commit 71951c9

Browse files
crosscross
authored andcommitted
Work around Java11 bug resulting in FindBugs false positive warning
1 parent 6b9b721 commit 71951c9

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

BEXCodeRefactoringExamples/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
<artifactId>becr</artifactId>
2525
<version>0.12.0</version>
2626
</dependency>
27+
<dependency>
28+
<groupId>com.github.spotbugs</groupId>
29+
<artifactId>spotbugs-annotations</artifactId>
30+
<version>4.0.3</version>
31+
<optional>true</optional>
32+
</dependency>
2733
<!-- Used for making Excel report -->
2834
<dependency>
2935
<groupId>org.apache.poi</groupId>

BEXCodeRefactoringExamples/src/main/java/info/codesaway/becr/comparedirectories/CompareDirectories.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
import com.google.common.collect.RangeMap;
7272
import com.google.common.collect.TreeRangeMap;
7373

74+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
7475
import info.codesaway.becr.diff.CorrespondingCode;
7576
import info.codesaway.becr.diff.FileType;
7677
import info.codesaway.becr.diff.ImpactType;
@@ -847,6 +848,7 @@ public String getHeaderName() {
847848

848849
private XSSFCellStyle WRAP_TEXT_CELL_STYLE;
849850

851+
@SuppressFBWarnings(value = "RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE", justification = "https://github.com/spotbugs/spotbugs/issues/756")
850852
public XSSFWorkbook generateExcelReport(final Path excelReportPath,
851853
final Map<String, String> projectSheetNameMap,
852854
final CompareDirectoriesResult compareDirectoriesResult) throws IOException {

0 commit comments

Comments
 (0)