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

Class cast Exception occurred when JButton is set to JSpinner

XMLWordPrintable

    • tiger
    • generic
    • generic
    • Verified



      Name: iaR10016 Date: 05/12/2003


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.5.0-b06
                        (passes with JDK1.5.0-b05, JDK1.4.2-b22)
      JCK : JCK1.4a-runtime
      Platform[s] : all
      switch/Mode : default
      JCK test owner : http://javaweb.eng/jck/usr/owners.jto
      Falling tests : api/javax_swing/interactive/JSpinnerTests.html#JSpinnerTests [JSpinnerTest0003]
                        api/javax_swing/JSpinner/index.html#setget [JSpinner2003]

      Two JCK1.4a-runtime api/javax_swing tests fail on JDK1.5.0-b06 on all platforms with
      java.lang.ClassCastException.

      Test source location:
      =====================
      /java/re/jck/1.4a/archive/fcs/binaries/JCK-runtime-14a/tests/api/javax_swing/interactive/JSpinnerTests.java
      /java/re/jck/1.4a/archive/fcs/binaries/JCK-runtime-14a/tests/api/javax_swing/JSpinner/setgetTests.java

      jtr file location:
      ==================
      /net/jtgb4u4c.sfbay/export/sail15/results/tiger/b06/jck14a/sparc/sol10_sparc_gnomeclient_incgc_linux-8/workDir/api-interactive/javax_swing/interactive/JSpinnerTests_JSpinnerTests.jtr
      /net/jtgb4u4c.sfbay/export/sail15/results/tiger/b06/jck14a/sparc/sol10_sparc_gnomeclient_incgc_linux-8/workDir/api/javax_swing/JSpinner/index_setget.jtr

      How to reproduce:
      =================
      Run the following script (you may need to change it's JCK and JDK variables)
      --- script start ---
      #!/bin/bash
      JCK="/java/re/jck/1.4a/archive/fcs/binaries/JCK-runtime-14a"
      JDK="/java/re/jdk/1.5.0/promoted/latest/binaries/linux-i586"
      export CLASSPATH="$JCK/classes:$JCK/lib/javatest.jar"
      $JDK/bin/java javasoft.sqe.tests.api.javax.swing.interactive.JSpinner.JSpinnerTests -TestCaseID JSpinnerTest0003
      echo ---------------------------------------------------------------------------------------------
      $JDK/bin/java $switches javasoft.sqe.tests.api.javax.swing.JSpinner.setgetTests -TestCaseID JSpinner2003
      --- script end ---

      Test output:
      ============
      java.lang.ClassCastException: javax.swing.JButton
           at javax.swing.plaf.basic.BasicSpinnerUI$PropertyChangeHandler.propertyChange(BasicSpinnerUI.java:864)
           at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:264)
           at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:232)
           at javax.swing.JComponent.firePropertyChange(JComponent.java:3835)
           at javax.swing.JSpinner.setEditor(JSpinner.java:456)
           at javasoft.sqe.tests.api.javax.swing.interactive.JSpinner.JSpinnerTests.JSpinnerTest0003(JSpinnerTests.java:161)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:324)
           at javasoft.sqe.jck.lib.InteractiveTest.invokeTestCase(InteractiveTest.java:406)
           at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
           at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:127)
           at javasoft.sqe.tests.api.javax.swing.interactive.JSpinner.JSpinnerTests.main(JSpinnerTests.java:51)
      JSpinnerTest0003: Failed. Test case throws exception: java.lang.ClassCastException: javax.swing.JButton
      STATUS:Failed.test cases: 1; all failed; first test case failure: JSpinnerTest0003

      ---------------------------------------------------------------------------------------------
      java.lang.ClassCastException: javax.swing.JTextArea
           at javax.swing.plaf.basic.BasicSpinnerUI$PropertyChangeHandler.propertyChange(BasicSpinnerUI.java:864)
           at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:264)
           at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:232)
           at javax.swing.JComponent.firePropertyChange(JComponent.java:3835)
           at javax.swing.JSpinner.setEditor(JSpinner.java:456)
           at javasoft.sqe.tests.api.javax.swing.JSpinner.setgetTests.JSpinner2003(setgetTests.java:44)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:324)
           at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:399)
           at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
           at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:127)
           at javasoft.sqe.tests.api.javax.swing.JSpinner.setgetTests.main(setgetTests.java:27)
      JSpinner2003: Failed. Test case throws exception: java.lang.ClassCastException: javax.swing.JTextArea
      STATUS:Failed.test cases: 1; all failed; first test case failure: JSpinner2003

      Specific machine info:
      ======================
      Hostname: linux-8
      OS: Solaris 10 (sparc) (GNOME)

      ======================================================================

            apikalev Andrey Pikalev
            irasunw Ira Ira (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: