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

SwingWorker.get throws CancellationException

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 11
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      The specification of SwingWorker.get methods fail to declared unchecked exceptions declared to be thrown by the methods being overridden.

      Problem

      CancellationException is not specified in SwingWorker.get

      Solution

      The spec will copy the text from the parent class, if @throws CancellationException {@inheritDoc} will be added. The final text will be "Throws: CancellationException - if the computation was cancelled"

      Specification

      src/java.desktop/share/classes/javax/swing/SwingWorker.java
      
            * </pre>
      +     *
      +     * @throws CancellationException {@inheritDoc}
            */
           public final T get() throws InterruptedException, ExecutionException {
      
           /**
            * {@inheritDoc}
            * <p>
            * Please refer to {@link #get} for more details.
      +     *
      +     * @throws CancellationException {@inheritDoc}
            */
           public final T get(long timeout, TimeUnit unit) throws InterruptedException,

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              serb Sergey Bylokhov
              Reporter:
              ydanilev Yury Danilevich (Inactive)
              Reviewed By:
              Philip Race
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: