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

Optional class is final

XMLWordPrintable

    • x86_64
    • os_x

      FULL PRODUCT VERSION :


      ADDITIONAL OS VERSION INFORMATION :
      Darwin MTVC02T6609FVH4 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64

      A DESCRIPTION OF THE PROBLEM :
      The class Optional is listed as "final". This means you can't extend it and add behavior. There is no reason to make a class like this final. I wanted to add a function getN() that doesn't throw an exception but rather returns a null but I can't.

      REGRESSION. Last worked in version 8u162


      REPRODUCIBILITY :
      This bug can be reproduced always.

            psonal Pallavi Sonal (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: