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

Remove leftover diagnostic from test/jdk/java/io/Serializable/records/SerialPersistentFieldsTest.java

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 15
    • 14, 15
    • core-libs
    • b18

    Description

      Remove leftover diagnostic that dumps generated class from test/jdk/java/io/Serializable/records/SerialPersistentFieldsTest.java

      At one point it was useful to be able to inspect the generated bytecode using javap, but it was noticed recently for a different reason that the output file is always R1.class, which is clearly wrong. Anyway, this can simply be removed.

      --- a/test/jdk/java/io/Serializable/records/SerialPersistentFieldsTest.java
      +++ b/test/jdk/java/io/Serializable/records/SerialPersistentFieldsTest.java
      @@ -32,14 +32,12 @@
       
       import java.io.ByteArrayInputStream;
       import java.io.ByteArrayOutputStream;
      -import java.io.FileOutputStream;
       import java.io.IOException;
       import java.io.ObjectInputStream;
       import java.io.ObjectOutputStream;
       import java.io.ObjectStreamClass;
       import java.io.ObjectStreamField;
       import java.io.Serializable;
      -import java.io.UncheckedIOException;
       import java.lang.reflect.Field;
       import java.lang.reflect.Modifier;
       import java.math.BigDecimal;
      @@ -229,13 +227,6 @@
               ClassReader reader = new ClassReader(classBytes);
               ClassWriter writer = new ClassWriter(reader, COMPUTE_MAXS | COMPUTE_FRAMES);
               reader.accept(new SerialPersistentFieldsVisitor(writer, spf), 0);
      - try {
      - FileOutputStream fos = new FileOutputStream("R1.class");
      - fos.write(writer.toByteArray());
      - fos.close();
      - } catch (IOException ioe) {
      - throw new UncheckedIOException(ioe);
      - }
               return writer.toByteArray();
           }

      Attachments

        Activity

          People

            chegar Chris Hegarty
            chegar Chris Hegarty
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: