sboag 00/11/06 11:27:41
Modified: java/src/org/apache/xpath Expression.java
Log:
Check m_xpath for null also.
Revision Changes Path
1.7 +22 -8 xml-xalan/java/src/org/apache/xpath/Expression.java
Index: Expression.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/Expression.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Expression.java 2000/11/06 18:50:58 1.6
+++ Expression.java 2000/11/06 19:27:32 1.7
@@ -120,10 +120,17 @@
else
{
// Where to send diagnostics in this case?
- SourceLocator slocator = m_xpath.getLocator();
- System.out.println(fmsg + "; file " + slocator.getSystemId()
- + "; line " + slocator.getLineNumber() + "; column "
- + slocator.getColumnNumber());
+ if(null != m_xpath)
+ {
+ SourceLocator slocator = m_xpath.getLocator();
+ System.out.println(fmsg + "; file " + slocator.getSystemId()
+ + "; line " + slocator.getLineNumber() + ";
column "
+ + slocator.getColumnNumber());
+ }
+ else
+ {
+ System.out.println(fmsg);
+ }
}
}
@@ -176,10 +183,17 @@
}
else
{
- SourceLocator slocator = m_xpath.getLocator();
- System.out.println(fmsg + "; file " + slocator.getSystemId()
- + "; line " + slocator.getLineNumber() + "; column "
- + slocator.getColumnNumber());
+ if(null != m_xpath)
+ {
+ SourceLocator slocator = m_xpath.getLocator();
+ System.out.println(fmsg + "; file " + slocator.getSystemId()
+ + "; line " + slocator.getLineNumber() + ";
column "
+ + slocator.getColumnNumber());
+ }
+ else
+ {
+ System.out.println(fmsg);
+ }
}
}