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

After PrintScreen key pressed, Clipboard.getContents(null) would cost 20 seconds

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      linux

      Description

      ADDITIONAL SYSTEM INFORMATION :
      Linux

      A DESCRIPTION OF THE PROBLEM :
      Press PrintScreen key, then call Clipboard.getContents(null). You can find that it would cost 20 seconds.

      REGRESSION : Last worked in version 8u281

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1, Press PrintScreen key.
      2, Then call Clipboard.getContents(null)


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
       Hope that cost time would less than 1 seconds.
      ACTUAL -
      You can find that it would cost 20 seconds.

      ---------- BEGIN SOURCE ----------
      package taishan;

      import java.awt.Toolkit;
      import java.awt.datatransfer.Clipboard;

      public final class PrintScreenTest
      {

      public static void main(String[] args)
      {
      long startTime = System.currentTimeMillis();

      Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
      clipboard.getContents(null);

      //After PrintScreen key pressed, cost time is about 20 seconds.
      System.out.println("cost time="+(System.currentTimeMillis()-startTime));
      }

      }

      ---------- END SOURCE ----------

      FREQUENCY : always


        Attachments

          Activity

            People

            Assignee:
            sswsharm swati sharma
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: