cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan <xhh...@gmail.com>
Subject Use of new String(String value) constructor in CXF codes ?
Date Wed, 26 Sep 2012 09:37:55 GMT
While searching the codes, I saw that there are some cxf codes are using
new String(String value). like in StaxUtils, I am wondering is there any
special reason for this ?

public static Document read(XMLStreamReader reader, boolean recordLoc)
throws XMLStreamException {
        Document doc = DOMUtils.createDocument();
        if (reader.getLocation().getSystemId() != null) {
            try {
                doc.setDocumentURI(new
String(reader.getLocation().getSystemId()));
<-----------------------------------
            } catch (Exception e) {
                //ignore - probably not DOM level 3
            }
        }
        readDocElements(doc, doc, reader, true, recordLoc);
        return doc;
    }

Thanks

-- 
Ivan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message