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

StringBuffer serial form changed by removal of field

XMLWordPrintable

    • tiger
    • generic, x86
    • generic, linux, windows_2000
    • Verified



      Name: iaR10016 Date: 05/05/2003


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.5.0-b05
                        (passes with JDK1.5.0-b04, JDK1.4.2-b22)
      JCK : JCK1.4a-runtime
      Platform[s] : all
      switch/Mode : default
      JCK test owner : http://javaweb.eng/jck/usr/owners.jto
      Falling test[s]: api/java_lang/StringBuffer/serial/index.html#ConstructorTests
                        [ConstructorTest0001, ConstructorTest0002, ConstructorTest0003, ConstructorTest0004, ConstructorTest0005]

      JCK1.4a-runtime api/java_lang/StringBuffer/serial/index.html#ConstructorTests test fails with
      JDK1.5.0-b05 on all platforms.

      The test supposes that java.lang.StringBuffer class has "shared" field,
      but Specification does not require it.

      The test uses javasoft.sqe.serial.StreamObjectClass.StreamBuffer class to check java.lang.StringBuffer
      object structure. Here is source code fragment:

      --------- src/share/classes/javasoft/sqe/serial/spec/java/lang/StringBuffer.java ---------
      ...
      046> /* This method defines all the serializable fields */
      047> public void define() {
      048> if (ver >= 1.1) {
      049> defineField("count", INT);
      050> defineField("shared", BOOLEAN);
      051> defineField("value", CHARARRAY);
      052> }
      ...
      ------------------------------------------------------------------------------------------

      Java.lang.StringBuffer class contains "protected boolean shared" field in previous JDK builds,
      that is why the test passes with previous JDKs.

      Test source location:
      =====================
      /java/re/jck/1.4a/archive/fcs/binaries/JCK-runtime-14a/tests/api/java_lang/StringBuffer/serial/Version.java

      jtr file location:
      ==================
      /net/jtgb4u4c.sfbay/export/sail15/results/tiger/b05/jck14a/win32/win2000_smp_plugin_ie6.0_linux-22/workDir/api/java_lang/StringBuffer/serial/index_ConstructorTests.jtr

      How to reproduce:
      =================
      Run the following script (you may need to change it's JDK and JCK variables):
      --- script start ---
      #!/bin/bash
      JCK="/java/re/jck/1.4a/archive/fcs/binaries/JCK-runtime-14a"
      JDK="/java/re/jdk/1.5.0/promoted/latest/binaries/linux-i586"
      export CLASSPATH="$JCK/classes:$JCK/lib/javatest.jar"
      $JDK/bin/java javasoft.sqe.tests.api.java.lang.StringBuffer.serial.ConstructorTests
      --- script end ---

      Test output:
      ============
      Checking for assertion
      Creating StreamObject from Object
      Checking for JDK Version : 1.1
      Creating the spec class
      Verifying the constraints on the serial fields
      java.lang.IllegalArgumentException: Field not found: shared
           at javasoft.sqe.serial.StreamObjectClass.getField(StreamObjectClass.java:292)
           at javasoft.sqe.serial.spec.java.lang.StringBuffer.verify(StringBuffer.java:66)
           at javasoft.sqe.tests.api.java.lang.StringBuffer.serial.ConstructorTests.ConstructorTest0001(ConstructorTests.java:91)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:324)
           at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:399)
           at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
           at javasoft.sqe.tests.api.java.lang.StringBuffer.serial.ConstructorTests.main(ConstructorTests.java:412)
      ConstructorTest0001: Failed. Test case throws exception: java.lang.IllegalArgumentException: Field not found: shared
      Checking for assertion
      Creating StreamObject from Object
      Checking for JDK Version : 1.1
      Creating the spec class
      Verifying the constraints on the serial fields
      java.lang.IllegalArgumentException: Field not found: shared
           at javasoft.sqe.serial.StreamObjectClass.getField(StreamObjectClass.java:292)
           at javasoft.sqe.serial.spec.java.lang.StringBuffer.verify(StringBuffer.java:66)
           at javasoft.sqe.tests.api.java.lang.StringBuffer.serial.ConstructorTests.ConstructorTest0002(ConstructorTests.java:163)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:324)
           at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:399)
           at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
           at javasoft.sqe.tests.api.java.lang.StringBuffer.serial.ConstructorTests.main(ConstructorTests.java:412)
      ConstructorTest0002: Failed. Test case throws exception: java.lang.IllegalArgumentException: Field not found: shared
      Checking for assertion
      Creating StreamObject from Object
      Checking for JDK Version : 1.1
      Creating the spec class
      Verifying the constraints on the serial fields
      java.lang.IllegalArgumentException: Field not found: shared
           at javasoft.sqe.serial.StreamObjectClass.getField(StreamObjectClass.java:292)
           at javasoft.sqe.serial.spec.java.lang.StringBuffer.verify(StringBuffer.java:66)
           at javasoft.sqe.tests.api.java.lang.StringBuffer.serial.ConstructorTests.ConstructorTest0003(ConstructorTests.java:234)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:324)
           at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:399)
           at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
           at javasoft.sqe.tests.api.java.lang.StringBuffer.serial.ConstructorTests.main(ConstructorTests.java:412)
      ConstructorTest0003: Failed. Test case throws exception: java.lang.IllegalArgumentException: Field not found: shared
      Checking for assertion
      Creating StreamObject from Object
      Checking for JDK Version : 1.1
      Creating the spec class
      Verifying the constraints on the serial fields
      java.lang.IllegalArgumentException: Field not found: shared
           at javasoft.sqe.serial.StreamObjectClass.getField(StreamObjectClass.java:292)
           at javasoft.sqe.serial.spec.java.lang.StringBuffer.verify(StringBuffer.java:66)
           at javasoft.sqe.tests.api.java.lang.StringBuffer.serial.ConstructorTests.ConstructorTest0004(ConstructorTests.java:309)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:324)
           at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:399)
           at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
           at javasoft.sqe.tests.api.java.lang.StringBuffer.serial.ConstructorTests.main(ConstructorTests.java:412)
      ConstructorTest0004: Failed. Test case throws exception: java.lang.IllegalArgumentException: Field not found: shared
      Checking for assertion
      Creating StreamObject from Object
      Checking for JDK Version : 1.1
      Creating the spec class
      Verifying the constraints on the serial fields
      java.lang.IllegalArgumentException: Field not found: shared
           at javasoft.sqe.serial.StreamObjectClass.getField(StreamObjectClass.java:292)
           at javasoft.sqe.serial.spec.java.lang.StringBuffer.verify(StringBuffer.java:66)
           at javasoft.sqe.tests.api.java.lang.StringBuffer.serial.ConstructorTests.ConstructorTest0005(ConstructorTests.java:386)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:324)
           at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:399)
           at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
           at javasoft.sqe.tests.api.java.lang.StringBuffer.serial.ConstructorTests.main(ConstructorTests.java:412)
      ConstructorTest0005: Failed. Test case throws exception: java.lang.IllegalArgumentException: Field not found: shared
      STATUS:Failed.test cases: 5; all failed; first test case failure: ConstructorTest0001


      Specific machine info:
      ======================
      Hostname: linux-10
      OS: Solaris 8 (x86)

      Hostname: linux-22
      OS: Windows 2000 Pro

      ======================================================================

            mmcclosksunw Michael Mccloskey (Inactive)
            irasunw Ira Ira (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: