Community
Participate
Working Groups
Build ID: 2.1.2 Steps To Reproduce: I have been running Jtest's BugDetective feature on BIRT source code and it reported a few possible dangerous places where a NullPoiterException may be thrown under some circumstances. The attached screenshots from BugDetective will help to understand the exact flow which may lead to the exception. org.eclipse.birt.core.archive.compound.ArchiveFile: At line 146 if the excetion is thrown at line 125 (Screenshot NP1). org.eclipse.birt.core.script.NativeDateTimeSpan: Lines 108,116,124,132,140,148 all are dangerous from this point of view because the variable 'startDate' may be null if toDate(String) method is not able to parse its argument throwing ParseException. Since all these violations have the same origin, only one screenshot that depicts the problem (NP2) is attached. org.eclipse.birt.core.ui.utils.UIHelper: At line 136 since getURL may return null if MalformedURLException occurs (see NP3). Please let me know if this is a real problem or BugDetective is mistaken. Thank you! More information:
Created attachment 69483 [details] NP1
Created attachment 69484 [details] NP2
Created attachment 69485 [details] NP3
Fixed in chart plug-ins. Reassign to report engine team for birt.core issues.
engine should checkin these modification in head and v2.1.3 for NP1: the potential possibilities of NPE doesnot exist because the code in Screenshot NP1 has been modified in the newest code in head and v2.1.3 by someone else. for NP2: engine accepts both two relationships between startDate and endDate: a. startDate <= endDate b. startDate > endDate remove the assert processes in methods jsStaticFunction_years(), jsStaticFunction_months(), jsStaticFunction_days(), jsStaticFunction_hours(), jsStaticFunction_minutes(), jsStaticFunction_seconds(). and merge DateTimeSpan.java between head and v2.1.3 for NP3: Chart Team has fixed it.
adding iplog+ as per Ganymede IP log