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

JCK: java.beans.PropertyEditorManager.findEditor works incorrectly

    Details

    • Subcomponent:
    • Resolved In Build:
      b43
    • CPU:
      sparc
    • OS:
      solaris_2.6

      Description



      Name: dsR10051 Date: 12/15/2003


      Filed By : SPB JCK team (###@###.###)
      JDK : java full version "1.5.0-beta-b30"
      JCK : 1.5
      Platform[s] : Solaris
      switch/Mode :
      JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto
      Failing Test [s] : N/A


      Problem description
      ===================
      Method of class java.beans.PropertyEditorManager
      public static synchronized PropertyEditor findEditor(Class targetType)
      could not find editors for primitive type wrapters if
      editor search path has been changed and restored before.
      Minimized test demonstrates this bug.
          
      Minimized test:
      ===============
      ------- PropertyEditorTest01.java -------
      import java.beans.*;

      public class PropertyEditorTest01 {

          public static void main (String[] args) {
              String oldPath[] = PropertyEditorManager.getEditorSearchPath();
              String newPath[] = {"aaa.bbb", "aaa.ccc"};
              PropertyEditorManager.setEditorSearchPath(newPath);
              PropertyEditor pe = null;
              pe = PropertyEditorManager.findEditor(Argle.class);

              PropertyEditorManager.setEditorSearchPath(oldPath);
              pe = PropertyEditorManager.findEditor(java.lang.Double.TYPE);
              if (pe == null) {
                  System.out.println("Failed: could not find editor for " + java.lang.Double.TYPE);
              } else {
                  System.out.println("OKAY");
              }
          }
      }

      Argle.java
      public class Argle {
          public Argle () {}
      }

      ------- end-of-PropertyEditorTest01.java -------

      JCK test source location:
      ==========================
      /java/re/jck/1.5/promoted/latest/JCK-runtime-15/tests

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

      Minimized test output:
      ======================
      /set/java/jdk1.5.0/solaris/bin/java PropertyEditorTest01
      load of aaa.ccc.ByteEditor failed
      load of aaa.ccc.ShortEditor failed
      load of aaa.ccc.IntEditor failed
      load of aaa.ccc.LongEditor failed
      load of aaa.ccc.BoolEditor failed
      load of aaa.ccc.FloatEditor failed
      load of aaa.ccc.DoubleEditor failed
      Failed: could not find editor for double
                                                                                                                                           
                                                                                                                                           
      Failing Test [s] :
          api/java_beans/PropertyEditorManager/descriptions.html#PropertyEditor[PropertyEditorManager0012]
          api/java_beans/PropertyEditorManager/descriptions.html#PropertyEditor[PropertyEditorManager0013]
          api/java_beans/PropertyEditorManager/descriptions.html#PropertyEditor[PropertyEditorManager0014]
          api/java_beans/PropertyEditorManager/descriptions.html#PropertyEditor[PropertyEditorManager0015]
          api/java_beans/PropertyEditorManager/descriptions.html#PropertyEditor[PropertyEditorManager0016]
          api/java_beans/PropertyEditorManager/descriptions.html#PropertyEditor[PropertyEditorManager0017]
          api/java_beans/PropertyEditorManager/descriptions.html#PropertyEditor[PropertyEditorManager0018]
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bchristi Brent Christian
                Reporter:
                sdasunw Sda Sda (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: