src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DXMLPrinter.java

changeset 408
b0610cd08440
parent 286
f50545b5e2f1
child 637
9c07ef4934dd
     1.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DXMLPrinter.java	Thu Sep 26 10:43:28 2013 -0700
     1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DXMLPrinter.java	Fri Oct 04 16:21:34 2013 +0100
     1.3 @@ -110,7 +110,11 @@
     1.4              visitor.on(grammar);
     1.5              visitor.endDocument();
     1.6          } catch (XMLWriterException e) {
     1.7 -            throw (XMLStreamException) e.getCause();
     1.8 +            if (e.getCause() instanceof XMLStreamException) {
     1.9 +                throw (XMLStreamException) e.getCause();
    1.10 +            } else {
    1.11 +                throw new XMLStreamException(e);
    1.12 +            }
    1.13          }
    1.14      }
    1.15  
    1.16 @@ -123,7 +127,11 @@
    1.17          try {
    1.18              pattern.accept(visitor);
    1.19          } catch (XMLWriterException e) {
    1.20 -            throw (XMLStreamException) e.getCause();
    1.21 +            if (e.getCause() instanceof XMLStreamException) {
    1.22 +                throw (XMLStreamException) e.getCause();
    1.23 +            } else {
    1.24 +                throw new XMLStreamException(e);
    1.25 +            }
    1.26          }
    1.27      }
    1.28  
    1.29 @@ -136,7 +144,11 @@
    1.30          try {
    1.31              nc.accept(ncVisitor);
    1.32          } catch (XMLWriterException e) {
    1.33 -            throw (XMLStreamException) e.getCause();
    1.34 +            if (e.getCause() instanceof XMLStreamException) {
    1.35 +                throw (XMLStreamException) e.getCause();
    1.36 +            } else {
    1.37 +                throw new XMLStreamException(e);
    1.38 +            }
    1.39          }
    1.40      }
    1.41  

mercurial