Bug 173236 NPE is thrown when opening a design file that is created by a higher version BIRT
1. New a report, switch to xml-source view. 2. Edit the version number in line 2, from 3.2.10 to 3.2.11 and save. 3. Close the report and reopen it. The xml-source view is opened automatically. Switch to lay-out view, there's an error message window, and NPE is thrown in error-log view. When user is trying to open a design file that is created by a higher version BIRT, model will throw an exception and stop parsing the report design file. UI should 1. Prevent the NPE 2. Telling user that he is using a higher version design file that this build does not support. (Catch the exception and reflect the message in the exception to end user)
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/ErrorDetail.java
import java.util.List;
import javax.xml.parsers.ParserConfigurationException;
import org.eclipse.birt.report.model.api.activity.SemanticException;
import org.eclipse.birt.report.model.api.elements.SemanticError;
import org.eclipse.birt.report.model.api.extension.ExtendedElementException;
import org.eclipse.birt.report.model.core.DesignElement;
import org.eclipse.birt.report.model.core.Module;
import org.eclipse.birt.report.model.parser.DesignParserException;
import org.eclipse.birt.report.model.util.XMLParserException;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
/**
 * Provides detail information about errors found when opening a design file.
 * Includes the error type, error code, error message and so on.
 * <p>
 * Errors with types INVALID_XML, SYNTAX_ERROR or SEMANTIC_ERROR, can be
 * translated to an instance of this class. All error type constants are defined
 * in <code>DesignFileException</code>.
 * 
 * <p>
 * <table border="1" cellpadding="2" cellspacing="2" style="border-collapse:
 * collapse" bordercolor="#111111" align="center">
 * <th width="25%"></th>
 * <th width="25%">Invalid XML File</th>
 * <th width="25%">Syntax Error</th>
 * <th width="25%">Semantic Error</th>
 * 
 * <tr>
 * <td>type</td>
 * <td  align="center">INVALID_XML</td>