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

JTextComponent.paste: Comparison method violates contract?

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 7u80
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:

      Description

      FULL PRODUCT VERSION :
      java version "1.7.0_80"
      Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
      Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      Related to http://bugs.java.com/view_bug.do?bug_id=8023043, this issue occurs when pasting data from outlook to a JTextField.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Place data on the system clipboard and paste it into a JTextField using the keyboard commands.


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      java.lang.IllegalArgumentException: Comparison method violates its general contract!
      at java.util.TimSort.mergeHi(Unknown Source)
      at java.util.TimSort.mergeAt(Unknown Source)
      at java.util.TimSort.mergeCollapse(Unknown Source)
      at java.util.TimSort.sort(Unknown Source)
      at java.util.TimSort.sort(Unknown Source)
      at java.util.Arrays.sort(Unknown Source)
      at sun.awt.datatransfer.DataTransferer.setToSortedDataFlavorArray(Unknown Source)
      at sun.awt.datatransfer.ClipboardTransferable.<init>(Unknown Source)
      at sun.awt.datatransfer.SunClipboard.getContents(Unknown Source)
      at javax.swing.TransferHandler$TransferAction.actionPerformedImpl(Unknown Source)
      at javax.swing.TransferHandler$TransferAction.access$700(Unknown Source)
      at javax.swing.TransferHandler$TransferAction$1.run(Unknown Source)
      at javax.swing.TransferHandler$TransferAction$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      at javax.swing.TransferHandler$TransferAction$2.run(Unknown Source)
      at javax.swing.TransferHandler$TransferAction$2.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      at javax.swing.TransferHandler$TransferAction.actionPerformed(Unknown Source)
      at javax.swing.text.JTextComponent.invokeAction(Unknown Source)
      at javax.swing.text.JTextComponent.paste(Unknown Source)
      at javax.swing.text.DefaultEditorKit$PasteAction.actionPerformed(Unknown Source)
      at javax.swing.SwingUtilities.notifyAction(Unknown Source)
      at javax.swing.JComponent.processKeyBinding(Unknown Source)
      at javax.swing.JComponent.processKeyBindings(Unknown Source)
      at javax.swing.JComponent.processKeyEvent(Unknown Source)
      at java.awt.Component.processEvent(Unknown Source)
      at java.awt.Container.processEvent(Unknown Source)
      at java.awt.Component.dispatchEventImpl(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
      at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
      at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
      at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
      at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
      at java.awt.Component.dispatchEventImpl(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Window.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
      at java.awt.EventQueue.access$300(Unknown Source)
      at java.awt.EventQueue$3.run(Unknown Source)
      at java.awt.EventQueue$3.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      at java.awt.EventQueue$4.run(Unknown Source)
      at java.awt.EventQueue$4.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)

      REPRODUCIBILITY :
      This bug can be reproduced occasionally.

      CUSTOMER SUBMITTED WORKAROUND :
      Use the -Djava.util.Arrays.useLegacyMergeSort=true command line option to disable the Java 7 sort

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mcherkas Mikhail Cherkasov (Inactive)
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: