Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4396305

TransformerException.printStackTrace(PrintStream) doesn't print anything

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      tiger
    • CPU:
      generic, x86
    • OS:
      generic, linux, solaris_8, windows_xp
    • Verification:
      Verified

      Description

      Name: vtR10009 Date: 12/07/2000



       JAXP 1.1 method TransformerException.printStackTrace(PrintStream) doesn't print
      anything to PrintStream. See log below. Perhaps there are error with conversion
      output to PrintWriter in implementation.

      This bug presents in build jaxp-1.1ea2-b15-30_nov_2000 and affects the new test in
      TCK JAXP 1.1.
      ------------------------------------test.java-----------------------------
      public class test {
          
          public static void main(String argv[]) {
              String mess = "Message string";
              String outStr;
              TransformerException teNotInit = new TransformerException(mess);
              ByteArrayOutputStream bufSt = new ByteArrayOutputStream(1000);
              PrintStream prStr = new PrintStream(bufSt, true);
              TransformerException te = new TransformerException(mess);

              try{
                  throw teNotInit;
              }catch(TransformerException tEx){
                  tEx.printStackTrace(System.out);
                  tEx.printStackTrace(prStr);
                  outStr=bufSt.toString();
                  if (System.out.checkError()) System.out.println("Error in System.out!");
                  if (prStr.checkError()) System.out.println("Error in prStr!");
                  if (outStr.length()==0 ) System.out.println("out buffer is empty!");
                  System.out.println(" "+bufSt);
              }
          }
      }
      ------------------------------ log ------------------------------------------
      novo101:tests$ $JDK13/bin/java test
      out buffer is empty!
       

      -----------------------------------------------------------------------------
      ======================================================================

      Name: eaR10174 Date: 08/24/2003


        There is the same bug in jdk 1.5.0-beta-b16.


      =====

      Integrated the fix as part of Sept 12, 2003 JAXP integration into Tiger build 20



      ======================================================================
      ###@###.### 2003-09-12

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jsuttorsunw Jeff Suttor (Inactive)
              Reporter:
              vitcsunw Vitc Vitc (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: