Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ public String getElmementId(int rowNum) {
if (row == null) {
return null;
}
return row.getCell(ID_COL).getStringCellValue();
Cell cell = row.getCell(ID_COL);
return cell != null ? cell.getStringCellValue() : null;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ public String getElmementId(int rowNum) {
if (row == null) {
return null;
}
return row.getCell(ID_COL).getStringCellValue();
Cell cell = row.getCell(ID_COL);
return cell != null ? cell.getStringCellValue() : null;
}

public Relationship getRelationship(int rowNum) throws SpreadsheetException {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/spdx/spreadsheetstore/SnippetSheet.java
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,8 @@ private String rangeToStr(StartEndPointer rangePointer) throws InvalidSPDXAnalys
}
SpdxFile snippetFromFile = (SpdxFile)moFromFile.get();

if (Objects.isNull(row.getCell(BYTE_RANGE_COL)) && row.getCell(BYTE_RANGE_COL).getStringCellValue().trim().isEmpty()) {
throw new SpreadsheetException("Missing reqired byte range for Snippet ID "+id);
if (Objects.isNull(row.getCell(BYTE_RANGE_COL)) || row.getCell(BYTE_RANGE_COL).getStringCellValue().trim().isEmpty()) {
throw new SpreadsheetException("Missing required byte range for Snippet ID "+id);
}
String range = row.getCell(BYTE_RANGE_COL).getStringCellValue();
int start = 0;
Expand Down
Loading