[prev in list] [next in list] [prev in thread] [next in thread]
List: xerces-cvs
Subject: svn commit: r730453 -
From: mrglavas () apache ! org
Date: 2008-12-31 19:44:21
Message-ID: 20081231194421.24F5B23889D2 () eris ! apache ! org
[Download RAW message or body]
Author: mrglavas
Date: Wed Dec 31 11:44:20 2008
New Revision: 730453
URL: http://svn.apache.org/viewvc?rev=730453&view=rev
Log:
Copy the Location passed in if non-null and ensure that the events always return a \
non-null Location.
Modified:
xerces/java/trunk/src/org/apache/xerces/stax/events/XMLEventImpl.java
Modified: xerces/java/trunk/src/org/apache/xerces/stax/events/XMLEventImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/stax/events/XMLEventImpl.java?rev=730453&r1=730452&r2=730453&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/stax/events/XMLEventImpl.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/stax/events/XMLEventImpl.java Wed Dec 31 \
11:44:20 2008 @@ -27,6 +27,9 @@
import javax.xml.stream.events.StartElement;
import javax.xml.stream.events.XMLEvent;
+import org.apache.xerces.stax.EmptyLocation;
+import org.apache.xerces.stax.ImmutableLocation;
+
/**
* @xerces.internal
*
@@ -52,7 +55,12 @@
*/
XMLEventImpl(final int eventType, final Location location) {
fEventType = eventType;
- fLocation = location;
+ if (location != null) {
+ fLocation = new ImmutableLocation(location);
+ }
+ else {
+ fLocation = EmptyLocation.getInstance();
+ }
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic