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

JCK13a-interactive: api/java_awt/interactive/ChoiceTests.html#ChoiceTests fails

XMLWordPrintable

    • beta2
    • x86
    • linux
    • Verified



      Name: icR10030 Date: 06/04/2001


      java.lang.IllegalArgumentException after removing all elements in Choice.

      Testcase ChoiceTest0003 verifies Choice.remove(int), Choice.remove(String)
      and Choice.removeAll() methods. Choice.remove(int) and Choice.remove(String) work fine.

      But after calling Choice.removeAll() method, the choice tries to select item
      with index 0 which does not exists and therefore IllegalArgumentException is thrown.

      JDK : jdk1.4.0-b66
      JCK : JCK1.3a
      Platform[s] : Linux RedHat 6.2
      switch/Mode : -client -Xmixed
      JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto
      Failing Test : api/java_awt/interactive/ChoiceTests.html#ChoiceTests

      Test source location:
      =====================
      /net/jdk/export/disk8/local.java/jck1.3a/JCK-runtime-13a/tests/api/java_awt/interactive/ChoiceTests.java

      jtr file location:
      ==================
      /net/jtgb4u4c.eng/export/sail16/results/merlin/b66/jck13a/linux/redhat6.2_single_gnome_client_linux-13/workDir/api-interactive/java_awt/interactive/ChoiceTests_ChoiceTests.jtr

      How to reproduce:
      =================
      You may need to change values of environment variables.
      --------Script START---------------------
      #!/bin/sh

      JCK=/net/jdk/export/disk8/local.java/jck1.3a/JCK-runtime-13a
      export JCK
      CLASSPATH="${JCK}/classes:${JCK}/javatest.jar"
      export CLASSPATH
      JAVA_HOME=/net/jdk/export/disk8/local.java/jdk1.4/linux-i386
      export JAVA_HOME

      $JAVA_HOME/bin/java -version
      $JAVA_HOME/bin/java -Xmixed -Xfuture javasoft.sqe.tests.api.java.awt.interactive.ChoiceTests -TestCaseID ChoiceTest0003
      --------Script END----------------------

      Test output:
      ============
      java version "1.4.0-beta_refresh"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta_refresh-b66)
      Java HotSpot(TM) Client VM (build 1.4.0-beta_refresh-b66, mixed mode)
      java.lang.IllegalArgumentException: illegal Choice item position: 0
              at java.awt.Choice.select(Choice.java:424)
              at sun.awt.motif.MChoicePeer$1.run(MChoicePeer.java:100)
              at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:167)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:437)
              at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:150)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:131)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
      ChoiceTest0003: Failed. Choice test does NOT work as expected.
      STATUS:Failed.tests: 1; failed: 1; first test case failure: ChoiceTest0003

      Specific Machine Info:
      ======================
      Hostname: Linux-13
      Os: Redhat 6.2


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

            mbronsonsunw Mike Bronson (Inactive)
            ichesunw Iche Iche (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: