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

Seal the class hierarchy of Node, Camera, LightBase, Shape, Shape3D

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • jfx24
    • javafx
    • None
    • source, binary
    • minimal
    • No compatibility risk is expected, since the types could never have been usefully subclassed.
    • Java API
    • JDK

      Summary

      Node, Camera, LightBase, Shape, and Shape3D cannot be extended by user code and will be sealed.

      Problem

      None of these classes can be extended by user code, and any attempt to do so will fail at runtime with an exception. Since Java now supports sealed classes, we can turn a run-time error into a compile-time error.

      Solution

      Seal the class hierarchy and remove the run-time checks to turn this into a compile-time error instead.

            mstrauss Michael Strauß
            mstrauss Michael Strauß
            Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: