Uploaded image for project: 'Maven Shared Components'
  1. Maven Shared Components
  2. MSHARED-610

PrettyPrintXMLWriter internally uses java.io.PrintWriter without checking for any errors.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: maven-shared-utils-3.2.0
    • Component/s: None
    • Labels:
      None

      Description

      org.apache.maven.shared.utils.xml.PrettyPrintXMLWriter internally uses a java.io.PrintWriter. That class is catching all IOException s internally and does not propagate any exception itseld. Instead the checkError method is provided to check for any error during performing IO. The PrettyPrintXMLWriter must not silently ingore any exception during writing and either needs to provide a checkError method itself (to follow a bad idea) or should be updated to check for any IO errors and throw an exception.

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build maven-shared Jigsaw #717 (See https://builds.apache.org/job/maven-shared%20Jigsaw/717/)
        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. (schulte: http://svn.apache.org/viewvc/?view=rev&rev=1777864)

        • (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-shared Jigsaw #717 (See https://builds.apache.org/job/maven-shared%20Jigsaw/717/ ) 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. (schulte: http://svn.apache.org/viewvc/?view=rev&rev=1777864 ) (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build maven-shared #3337 (See https://builds.apache.org/job/maven-shared/3337/)
        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. (schulte: http://svn.apache.org/viewvc/?view=rev&rev=1777864)

        • (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-shared #3337 (See https://builds.apache.org/job/maven-shared/3337/ ) 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. (schulte: http://svn.apache.org/viewvc/?view=rev&rev=1777864 ) (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Jenkins build maven-shared #3336 (See https://builds.apache.org/job/maven-shared/3336/)
        MSHARED-610 PrettyPrintXMLWriter internally uses java.io.PrintWriter without checking for any errors.

        o Removed an incorrect '@throws' tag from the Javadoc.
        o Updated to provide causing exception with any AssertionErrors added in last
        commit. (schulte: http://svn.apache.org/viewvc/?view=rev&rev=1777862)

        • (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/PrettyPrintXMLWriter.java
        • (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java
          MSHARED-610 PrettyPrintXMLWriter internally uses java.io.PrintWriter without checking for any errors.

        o Updated the 'XMLWriter' interface method to allow implementations to throw
        'IOException's and made the implementations stop silently ignore any IO
        errors. This commit makes the API for writig match the API for reading which
        also throws 'IOException's. (schulte: http://svn.apache.org/viewvc/?view=rev&rev=1777861)

        • (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/PrettyPrintXMLWriter.java
        • (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/XMLWriter.java
        • (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/XmlWriterUtil.java
        • (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java
        • (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomWriter.java
        • (edit) maven-shared-utils/src/test/java/org/apache/maven/shared/utils/xml/PrettyPrintXmlWriterTest.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Jenkins build maven-shared #3336 (See https://builds.apache.org/job/maven-shared/3336/ ) MSHARED-610 PrettyPrintXMLWriter internally uses java.io.PrintWriter without checking for any errors. o Removed an incorrect '@throws' tag from the Javadoc. o Updated to provide causing exception with any AssertionErrors added in last commit. (schulte: http://svn.apache.org/viewvc/?view=rev&rev=1777862 ) (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/PrettyPrintXMLWriter.java (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java MSHARED-610 PrettyPrintXMLWriter internally uses java.io.PrintWriter without checking for any errors. o Updated the 'XMLWriter' interface method to allow implementations to throw 'IOException's and made the implementations stop silently ignore any IO errors. This commit makes the API for writig match the API for reading which also throws 'IOException's. (schulte: http://svn.apache.org/viewvc/?view=rev&rev=1777861 ) (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/PrettyPrintXMLWriter.java (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/XMLWriter.java (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/XmlWriterUtil.java (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomWriter.java (edit) maven-shared-utils/src/test/java/org/apache/maven/shared/utils/xml/PrettyPrintXmlWriterTest.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build maven-shared Jigsaw #716 (See https://builds.apache.org/job/maven-shared%20Jigsaw/716/)
        MSHARED-610 PrettyPrintXMLWriter internally uses java.io.PrintWriter without checking for any errors.

        o Removed an incorrect '@throws' tag from the Javadoc.
        o Updated to provide causing exception with any AssertionErrors added in last
        commit. (schulte: http://svn.apache.org/viewvc/?view=rev&rev=1777862)

        • (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/PrettyPrintXMLWriter.java
        • (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java
          MSHARED-610 PrettyPrintXMLWriter internally uses java.io.PrintWriter without checking for any errors.

        o Updated the 'XMLWriter' interface method to allow implementations to throw
        'IOException's and made the implementations stop silently ignore any IO
        errors. This commit makes the API for writig match the API for reading which
        also throws 'IOException's. (schulte: http://svn.apache.org/viewvc/?view=rev&rev=1777861)

        • (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/PrettyPrintXMLWriter.java
        • (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/XMLWriter.java
        • (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/XmlWriterUtil.java
        • (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java
        • (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomWriter.java
        • (edit) maven-shared-utils/src/test/java/org/apache/maven/shared/utils/xml/PrettyPrintXmlWriterTest.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-shared Jigsaw #716 (See https://builds.apache.org/job/maven-shared%20Jigsaw/716/ ) MSHARED-610 PrettyPrintXMLWriter internally uses java.io.PrintWriter without checking for any errors. o Removed an incorrect '@throws' tag from the Javadoc. o Updated to provide causing exception with any AssertionErrors added in last commit. (schulte: http://svn.apache.org/viewvc/?view=rev&rev=1777862 ) (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/PrettyPrintXMLWriter.java (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java MSHARED-610 PrettyPrintXMLWriter internally uses java.io.PrintWriter without checking for any errors. o Updated the 'XMLWriter' interface method to allow implementations to throw 'IOException's and made the implementations stop silently ignore any IO errors. This commit makes the API for writig match the API for reading which also throws 'IOException's. (schulte: http://svn.apache.org/viewvc/?view=rev&rev=1777861 ) (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/PrettyPrintXMLWriter.java (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/XMLWriter.java (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/XmlWriterUtil.java (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3Dom.java (edit) maven-shared-utils/src/main/java/org/apache/maven/shared/utils/xml/Xpp3DomWriter.java (edit) maven-shared-utils/src/test/java/org/apache/maven/shared/utils/xml/PrettyPrintXmlWriterTest.java

          People

          • Assignee:
            schulte77 Christian Schulte
            Reporter:
            schulte77 Christian Schulte
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development