<changes>
<release version="3.7-beta4" date="2010-??-??">
+ <action dev="poi-developers" type="fix">50075 - avoid NPE in ListLevel.getNumberText() when numberText is null </action>
<action dev="poi-developers" type="fix">50067 - marked commons-logging and log4j as optional dependencies in POI poms</action>
<action dev="poi-developers" type="add">49928 - allow overridden built-in formats in XSSFCellStyle</action>
<action dev="poi-developers" type="fix">49919 - support for BorderCode in HWPF</action>
--- /dev/null
+/* ====================================================================\r
+ Licensed to the Apache Software Foundation (ASF) under one or more\r
+ contributor license agreements. See the NOTICE file distributed with\r
+ this work for additional information regarding copyright ownership.\r
+ The ASF licenses this file to You under the Apache License, Version 2.0\r
+ (the "License"); you may not use this file except in compliance with\r
+ the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+==================================================================== */\r
+package org.apache.poi.hwpf.usermodel;\r
+\r
+import org.apache.poi.hwpf.HWPFDocument;\r
+import org.apache.poi.hwpf.HWPFTestDataSamples;\r
+import org.apache.poi.hwpf.model.ListFormatOverride;\r
+import org.apache.poi.hwpf.model.ListLevel;\r
+\r
+import junit.framework.TestCase;\r
+\r
+public class TestBug50075 extends TestCase\r
+{\r
+\r
+ public void test() {\r
+ HWPFDocument doc = HWPFTestDataSamples.openSampleFile("Bug50075.doc");\r
+ Range range = doc.getRange();\r
+ assertEquals(1, range.numParagraphs());\r
+ ListEntry entry = (ListEntry) range.getParagraph(0);\r
+ ListFormatOverride override = doc.getListTables().getOverride(entry.getIlfo());\r
+ ListLevel level = doc.getListTables().getLevel(override.getLsid(), entry.getIlvl());\r
+ \r
+ // the bug reproduces, if this call fails with NullPointerException\r
+ level.getNumberText();\r
+ }\r
+ \r
+}\r