Bug 14919 - HSSFSheet#getNumMergedRegions() throws NullPointerException
Summary: HSSFSheet#getNumMergedRegions() throws NullPointerException
Status: RESOLVED DUPLICATE of bug 13483
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.0-dev
Hardware: Other other
: P3 minor (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-28 04:08 UTC by Toshiaki Kamoshida
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Toshiaki Kamoshida 2002-11-28 04:08:44 UTC
Hello,

When HSSFSheet instance is created by 
org.apache.poi.hssf.usermodel.HSSFSheet#createSheet(),instance field 
org.apache.poi.hssf.model.Sheet#marged is(not initialized correctry?) null,
calling HSSFSheet#getNumMergedRegions() and #getMergedRegionAt(int) throws 
NullPointerException.

I found it at 1.8.0dev.

Please try this code.
-------------------------------------------------------------
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

public class POITest {
	public static void main(String args[]){
		HSSFWorkbook b = new HSSFWorkbook();
		HSSFSheet s = b.createSheet();
		System.out.println(s.getNumMergedRegions());
	}
}
-------------------------------------------------------------

Thanks for each developer's good effort.
Comment 1 Toshiaki Kamoshida 2002-12-04 06:17:53 UTC
Sorry,this is a duplicate of bug No.13483.

*** This bug has been marked as a duplicate of 13483 ***