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

PIT: Regression Test - CloseStreamTest fails on Win32

XMLWordPrintable

    • 2d
    • b26
    • x86
    • windows_xp

      The regression test CloseStreamTest.java located under javax/print fails on Win32 platforms by throwing a NullPointerException on the following PIT build:

      java version "2d-jcg-win-01-2003-09-27.tiger"
      Java(TM) 2 Runtime Environment, Standard Edition (build 2d-jcg-win-01-2003-09-27.tiger)
      Java HotSpot(TM) Client VM (build 1.5.0-beta-b21, mixed mode)

      I tried simulating the same using my own testcase and I have noticed a change between b21 and the PIT build. When the doc flavor is INPUT_STREAM.POSTSCRIPT and when I return null in getPrintData() and getStreamForBytes() in the doc implementation, a null pointer exception is thrown on the PIT build. But whereas on the previous builds a PrintException is thrown saying the stream is closed. This PrintException is caught by the regression test CloseStream.java as it expects such an exception. But NPE is thrown unexpectedly which is not getting caught anywhere and hence makes the test fail.

      This is reproducible only on Win32 platforms and it works fine on Solaris.

      I have attached a sample testcase which would exhibit the above explained behaviour. Execute the testcase on win32 and you will get a NPE on the PIT build. On the prev builds, a PrintException will be thrown.

            jgodinez Jennifer Godinez (Inactive)
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: