Untitled

 avatar
unknown
plain_text
a year ago
841 B
4
Indexable
	private void newSplOne(XSSFWorkbook wb, String iOUName, XSSFSheet hssfSheet, CellStyle style, XSSFCellStyle stl) {
		XSSFCell cell0;
		if (null != iOUName) {
			cell0 = hssfSheet.getRow(0).createCell(3);
			cell0.setCellStyle(stl);
			cell0.setCellValue("Back");
			Hyperlink hp = wb.getCreationHelper().createHyperlink(Hyperlink.LINK_DOCUMENT);

			hp.setAddress(LiteralConstants.INDEX1);
			cell0.setHyperlink(hp);

			hssfSheet.createRow(1);
			cell0 = hssfSheet.getRow(1).createCell(0);
			cell0.setCellValue(LiteralConstants.OUNAME);

			cell0 = hssfSheet.getRow(1).createCell(1);
			cell0.setCellValue(iOUName);
			cell0.setCellStyle(style);
		}
	}
	
	In the above code I'm getting SAST error that Dead Code: Expression is Always false for "if (null != iOUName)" can you modify the above code and give me solution
Editor is loading...
Leave a Comment