[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    [OpenJDK 2D-Dev] JDK 14 RFR of JDK-8231334: Suppress warnings on non-serializable instance fields in
From:       Joe Darcy <joe.darcy () oracle ! com>
Date:       2019-09-21 19:48:18
Message-ID: ed084e59-bebd-714e-d8af-893115f0e6b3 () oracle ! com
[Download RAW message or body]

Hello,

Quick background, I'm working on expanding the compile-time 
serialization checks of javac's -Xlint:serial option. Ahead of that work 
going back, I'm analyzing the JDK sources and plan to pre-suppress the 
coming-soon new warnings, fixing or at least filing follow-up bugs for 
any problems that are found. Corresponding suppression bugs are already 
out for review against core libs (JDK-8231202) and security libs 
(JDK-8231262).

The new check in development is if a serializable class has an instance 
field that is not declared to be a serializable type. This might 
actually be fine in practice, such as if the field in question always 
points to a serializable object at runtime, but it is arguably worth 
noting as an item of potential concern. This check is skipped if the 
class using the serialPersistentFields mechanism.

For the client libs, the webrev with the new @SuppressedWarnings 
annotations is:

        JDK-8231334: Suppress warnings on non-serializable instance fields 
in client libs serializable classes
        http://cr.openjdk.java.net/~darcy/8231334.0/

The changes are mostly in awt, but also some in beans, a few in 
printing, and one in sound.

As discussed with Phil off-line, the new checks also found an existing 
known issue, the auxiliary class java.awt.ImageMediaEntry declared in 
MediaTracker.java is not serializable/deserializable in practice 
(JDK-4397681).

Thanks,

-Joe


[Attachment #3 (text/html)]

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>Quick background, I'm working on expanding the compile-time
      serialization checks of javac's -Xlint:serial option. Ahead of
      that work going back, I'm analyzing the JDK sources and plan to
      pre-suppress the coming-soon new warnings, fixing or at least
      filing follow-up bugs for any problems that are found.
      Corresponding suppression bugs are already out for review against
      core libs (JDK-8231202) and security libs (JDK-8231262).</p>
    <p>The new check in development is if a serializable class has an
      instance field that is not declared to be a serializable type.
      This might actually be fine in practice, such as if the field in
      question always points to a serializable object at runtime, but it
      is arguably worth noting as an item of potential concern. This
      check is skipped if the class using the serialPersistentFields
      mechanism.</p>
    <p>For the client libs, the webrev with the new @SuppressedWarnings
      annotations is:<br>
    </p>
    <p>       JDK-8231334: Suppress warnings on non-serializable instance
      fields in client libs serializable classes <br>
             <a class="moz-txt-link-freetext" \
href="http://cr.openjdk.java.net/~darcy/8231334.0/">http://cr.openjdk.java.net/~darcy/8231334.0/</a></p>
  <p>The changes are mostly in awt, but also some in beans, a few in
      printing, and one in sound.<br>
    </p>
    <p>As discussed with Phil off-line, the new checks also found an
      existing known issue, the auxiliary class <span
        class="c-message__body" dir="auto" \
data-qa="message-text">java.awt.ImageMediaEntry  declared in </span><span \
class="c-message__body" dir="auto"  data-qa="message-text"><span \
class="c-message__body" dir="auto"  data-qa="message-text">MediaTracker.java is not
          serializable/deserializable in practice (JDK-4397681).</span></span></p>
    <p><span class="c-message__body" dir="auto" data-qa="message-text"><span
          class="c-message__body" dir="auto" \
data-qa="message-text">Thanks,</span></span></p>  <p><span class="c-message__body" \
                dir="auto" data-qa="message-text"><span
          class="c-message__body" dir="auto" data-qa="message-text">-Joe<br>
        </span></span></p>
  </body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic