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

ClassCastException at javax.swing.LayoutComparator.compare

XMLWordPrintable

    • x86
    • linux_2.6

      FULL PRODUCT VERSION :
      1.7.0_07 32bit Oracle Corporation


      ADDITIONAL OS VERSION INFORMATION :
      Linux 2.6.33.3-mac i386 (but issue is os independent)

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      -Djdk.map.althashing.threshold=0

      A DESCRIPTION OF THE PROBLEM :
      API call java.awt.Window.isFocusableWindow throws unexpected ClassCastException

      REGRESSION. Last worked in version 6u31

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create a window with many components, listeners, etc. and call " isFocusableWindow " on it.
      Start VM with jdk.map.althashing.threshold to 0.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      No ClassCastException
      ACTUAL -
      java.lang.ClassCastException


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      JDK=1.7.0_07 32bit Oracle Corporation;OS=Linux
      2.6.33.3-mac i386;Date=30.10.2012 15:35:27
      java.lang.ClassCastException
      at javax.swing.LayoutComparator.compare(LayoutComparator.java:75)
      at javax.swing.LayoutComparator.compare(LayoutComparator.java:42)
      at java.util.TimSort.countRunAndMakeAscending(TimSort.java:329)
      at java.util.TimSort.sort(TimSort.java:189)
      at java.util.TimSort.sort(TimSort.java:173)
      at java.util.Arrays.sort(Arrays.java:659)
      at java.util.Collections.sort(Collections.java:217)
      at
      javax.swing.SortingFocusTraversalPolicy.enumerateAndSortCycle(SortingFocusTraversalPolicy.java:136)
      at
      javax.swing.SortingFocusTraversalPolicy.getFocusTraversalCycle(SortingFocusTraversalPolicy.java:110)
      at
      javax.swing.SortingFocusTraversalPolicy.getFirstComponent(SortingFocusTraversalPolicy.java:435)
      at
      javax.swing.LayoutFocusTraversalPolicy.getFirstComponent(LayoutFocusTraversalPolicy.java:166)
      at
      javax.swing.SortingFocusTraversalPolicy.getDefaultComponent(SortingFocusTraversalPolicy.java:515)
      at java.awt.Window.isFocusableWindow(Window.java:2476)


      REPRODUCIBILITY :
      This bug can be reproduced occasionally.

      CUSTOMER SUBMITTED WORKAROUND :
      disable tim sort

            ant Anton Tarasov (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: