src/share/jaxws_classes/javax/xml/bind/util/JAXBSource.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -39,10 +39,11 @@
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.transform.sax.SAXSource;
+import org.xml.sax.XMLFilter;
/**
* JAXP {@link javax.xml.transform.Source} implementation
* that marshals a JAXB-generated object.
*
@@ -208,11 +209,11 @@
}
// SAX allows ContentHandler to be changed during the parsing,
// but JAXB doesn't. So this repeater will sit between those
// two components.
- private XMLFilterImpl repeater = new XMLFilterImpl();
+ private XMLFilter repeater = new XMLFilterImpl();
public void setContentHandler(ContentHandler handler) {
repeater.setContentHandler(handler);
}
public ContentHandler getContentHandler() {
@@ -238,11 +239,11 @@
public void parse() throws SAXException {
// parses a content object by using the given marshaller
// SAX events will be sent to the repeater, and the repeater
// will further forward it to an appropriate component.
try {
- marshaller.marshal( contentObject, repeater );
+ marshaller.marshal( contentObject, (XMLFilterImpl)repeater );
} catch( JAXBException e ) {
// wrap it to a SAXException
SAXParseException se =
new SAXParseException( e.getMessage(),
null, null, -1, -1, e );