Author: dda
Date: 2007-12-20 08:15:04 -0800 (Thu, 20 Dec 2007)
New Revision: 7637

Modified:
   
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9Generator.java
Log:
Change 20071220-dda-O by [EMAIL PROTECTED] on 2007-12-20 10:57:22 EST
    in /Users/dda/laszlo/src/svn/openlaszlo/branches/devildog
    for http://svn.openlaszlo.org/openlaszlo/branches/devildog

Summary: SWF9: Fix null pointer exception during compilation

New Features:

Bugs Fixed: LPP-5234

Technical Reviewer: ptw (pending)
QA Reviewer: hminsky (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
    protect against null pointer in error messages, if unknown source file name

Tests:
    haven't seen the test case that triggers the error yet, Henry will test.



Modified: 
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9Generator.java
===================================================================
--- 
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9Generator.java
    2007-12-20 16:14:48 UTC (rev 7636)
+++ 
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9Generator.java
    2007-12-20 16:15:04 UTC (rev 7637)
@@ -555,7 +555,10 @@
 
           // actualSrcLine is the name/linenumber of the actual files
           // used in compilation, not the original sources.
-          String actualSrcLine = tunit.getSourceFileName() + ": " + 
err.getLineNumber();
+          String actualSrcFile = tunit.getSourceFileName();
+          if (actualSrcFile == null)
+            actualSrcFile = "(" + tunit.getName() + ")";
+          String actualSrcLine = actualSrcFile + ": " + err.getLineNumber();
           if (tunit == null || 
               ((srcLine = tunit.originalLineNumber(err.getLineNumber())) <= 
0)) {
             srcLineStr = actualSrcLine;


_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Reply via email to