Skip to content

Commit

Permalink
Make sure we use the constructor that takes the message to work aroun…
Browse files Browse the repository at this point in the history
…d an issue in geromino-specs stax-api

git-svn-id: https://svn.apache.org/repos/asf/cxf/trunk@1546067 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
dkulp committed Nov 27, 2013
1 parent a9f3c94 commit c873f99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ private Element validate(XMLStreamReader input) throws XMLStreamException, IOExc
try {
schema.newValidator().validate(new DOMSource(newElement));
} catch (SAXException e) {
throw new XMLStreamException(e);
throw new XMLStreamException(e.getMessage(), e);
}
}
return rootElement;
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ public static void copy(Source source, XMLStreamWriter writer) throws XMLStreamE
reader.parse(((SAXSource)source).getInputSource());
return;
} catch (Exception e) {
throw new XMLStreamException(e);
throw new XMLStreamException(e.getMessage(), e);
}
} else if (ss.getInputSource() == null) {
//nothing to copy, just return
Expand Down Expand Up @@ -1869,14 +1869,14 @@ public static XMLStreamReader configureReader(XMLStreamReader reader, Integer ma
if (allowInsecureParser) {
LOG.warning("INSTANCE_NOT_XMLSTREAMREADER2");
} else {
throw new XMLStreamException(cce);
throw new XMLStreamException(cce.getMessage(), cce);
}
} catch (IllegalArgumentException cce) {
//not a property supported by this version of woodstox
if (allowInsecureParser) {
LOG.log(Level.WARNING, "SECURE_PROPERTY_NOT_SUPPORTED", cce.getMessage());
} else {
throw new XMLStreamException(cce);
throw new XMLStreamException(cce.getMessage(), cce);
}
}
return reader;
Expand Down

0 comments on commit c873f99

Please sign in to comment.