Constractor of SXSSFSheet: public SXSSFSheet(SXSSFWorkbook workbook, XSSFSheet xSheet) throws IOException { _workbook = workbook; _sh = xSheet; _writer = workbook.createSheetDataWriter(); setRandomAccessWindowSize(_workbook.getRandomAccessWindowSize()); _autoSizeColumnTracker = new AutoSizeColumnTracker(this); } Fields of SXSSFWorkbook : private final Map<SXSSFSheet,XSSFSheet> _sxFromXHash = new HashMap<>(); private final Map<XSSFSheet,SXSSFSheet> _xFromSxHash = new HashMap<>(); When call the constractor of SXSSFSheet, has to deal with the fields of SXSSFWorkbook ,_sxFromXHash and _xFromSxHash .
Sorry, but I don't really understand the actual issue, can you describe in some more detail what you think is wrong or should be changed?
(In reply to Dominik Stadler from comment #1) > Sorry, but I don't really understand the actual issue, can you describe in > some more detail what you think is wrong or should be changed? if we have a XSSFSheet , and want to get a SXSSFSheet, so we would invoke the constractor of SXSSFSheet : public SXSSFSheet(SXSSFWorkbook workbook, XSSFSheet xSheet) throws IOException . and then we do this : SXSSFWorkbook#getSheetAt(i), will return null , because of the method SXSSFWorkbook#registerSheetMapping do not invoked so we shoud call SXSSFWorkbook#registerSheetMapping when we invoke the constractor of SXSSFSheet : public SXSSFSheet(SXSSFWorkbook workbook, XSSFSheet xSheet) throws IOException .