From: <fwi...@us...> - 2008-08-05 17:16:24
|
Revision: 5080 http://jython.svn.sourceforge.net/jython/?rev=5080&view=rev Author: fwierzbicki Date: 2008-08-05 17:16:19 +0000 (Tue, 05 Aug 2008) Log Message: ----------- Guard against null text in PySyntaxError. Modified Paths: -------------- branches/asm/src/org/python/core/PySyntaxError.java Modified: branches/asm/src/org/python/core/PySyntaxError.java =================================================================== --- branches/asm/src/org/python/core/PySyntaxError.java 2008-08-05 16:55:18 UTC (rev 5079) +++ branches/asm/src/org/python/core/PySyntaxError.java 2008-08-05 17:16:19 UTC (rev 5080) @@ -20,6 +20,11 @@ String filename) { super(Py.SyntaxError); + //XXX: null text causes Java error, though I bet I'm not supposed to + // get null text. + if (text == null) { + text = ""; + } PyObject[] tmp = new PyObject[] { new PyString(filename), new PyInteger(line), new PyInteger(column), new PyString(text) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |