You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sc...@apache.org on 2017/01/08 04:41:30 UTC
svn commit: r1777864 -
/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java
Author: schulte
Date: Sun Jan 8 04:41:30 2017
New Revision: 1777864
URL: http://svn.apache.org/viewvc?rev=1777864&view=rev
Log:
[MSHARED-610] PrettyPrintXMLWriter internally uses java.io.PrintWriter without checking for any errors.
o Updated to restore JDK compatibility by removing calls to constructors
only available since Java 7.
Modified:
maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java
Modified: maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java?rev=1777864&r1=1777863&r2=1777864&view=diff
==============================================================================
--- maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java (original)
+++ maven/shared/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java Sun Jan 8 04:41:30 2017
@@ -385,7 +385,7 @@ public class Xpp3Dom
catch ( final IOException e )
{
// JDK error in StringWriter.
- throw new AssertionError( "Unexpected IOException from StringWriter.", e );
+ throw (AssertionError) new AssertionError( "Unexpected IOException from StringWriter." ).initCause( e );
}
}
@@ -403,7 +403,7 @@ public class Xpp3Dom
catch ( final IOException e )
{
// JDK error in StringWriter.
- throw new AssertionError( "Unexpected IOException from StringWriter.", e );
+ throw (AssertionError) new AssertionError( "Unexpected IOException from StringWriter." ).initCause( e );
}
}