jaxb-api-2.0/src/main/java/javax/xml/bind/helpers/AbstractUnmarshallerImpl.java [205:226]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public Object unmarshal(Source source) throws JAXBException {
        if (source == null) {
            throw new IllegalArgumentException("source must not be null");
        } else if (source instanceof SAXSource) {
            SAXSource saxSource = (SAXSource) source;
            XMLReader reader = saxSource.getXMLReader();
            if (reader == null) {
                reader = getXMLReader();
            }
            return unmarshal(reader, saxSource.getInputSource());
        } else if (source instanceof StreamSource) {
            StreamSource ss = (StreamSource) source;
            InputSource is = new InputSource();
            is.setSystemId(ss.getSystemId());
            is.setByteStream(ss.getInputStream());
            is.setCharacterStream(ss.getReader());
            return unmarshal(is);
        } else if (source instanceof DOMSource)
            return unmarshal(((DOMSource) source).getNode());
        else
            throw new IllegalArgumentException();
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



jaxb-api-2.1/src/main/java/javax/xml/bind/helpers/AbstractUnmarshallerImpl.java [205:226]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public Object unmarshal(Source source) throws JAXBException {
        if (source == null) {
            throw new IllegalArgumentException("source must not be null");
        } else if (source instanceof SAXSource) {
            SAXSource saxSource = (SAXSource) source;
            XMLReader reader = saxSource.getXMLReader();
            if (reader == null) {
                reader = getXMLReader();
            }
            return unmarshal(reader, saxSource.getInputSource());
        } else if (source instanceof StreamSource) {
            StreamSource ss = (StreamSource) source;
            InputSource is = new InputSource();
            is.setSystemId(ss.getSystemId());
            is.setByteStream(ss.getInputStream());
            is.setCharacterStream(ss.getReader());
            return unmarshal(is);
        } else if (source instanceof DOMSource)
            return unmarshal(((DOMSource) source).getNode());
        else
            throw new IllegalArgumentException();
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



