Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-6823064

Unnecessary reload of current configuration on opening Configuration Editor

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • jt4.2.1
    • None
    • tools
    • b08
    • x86
    • windows_xp
    • Verified

      Javatest 4.2 RR

      See com.sun.javatest.exec.ConfigEditor.ConfigEditor(JComponent, InterviewParameters, ExecModel, UIFactory) :

      try {
                 viewConfig = config.getTestSuite().createInterview();
                 viewConfig.setWorkDirectory(mainConfig.getWorkDirectory());
      >>> copy(mainConfig, mainConfig); // for synchronization
                 copy(mainConfig, viewConfig); // init view to be the same as main
             }

      This call -> copy(mainConfig, mainConfig); looks very suspicious and redundant.
      It actually copies data from object into itself. Additionally it may cause a lot of unnecessary actions as "mainConfig" is a live main object that has a lot of listeners attached. And "load(Map, boolean)" procedure causes these listeners to be invoked and there can be even some Tree updates because of that.

      This functionality should be revised and probably removed or changed with something more reliable.
      The fix rolled back due to possible initialization issue caused by calling virtual methods from constructors of non-final Questions

      Try JSR 290 TCK 1.0. When reloading a workdir, I get this exception, which is stops loading.
      java.lang.NullPointerException
        at com.sun.tck.j2me.interview.JarQuestion.getValue(JarQuestion.java:59)
        at com.sun.interview.FileQuestion.setDefaultValue(FileQuestion.java:98)
        at com.sun.interview.FileQuestion.<init>(FileQuestion.java:48)
        at com.sun.tck.j2me.interview.JarQuestion.<init>(JarQuestion.java:27)
        at com.sun.tck.j2me.interview.MidpCommAdvInterview.<init>(MidpCommAdvInterview.java:101)
        at com.sun.tck.j2me.interview.CldcBaseCommInterview.<init>(CldcBaseCommInterview.java:46)
        at com.sun.tck.j2me.interview.VmInterview.<init>(VmInterview.java:62)
        at com.sun.tck.j2me.interview.VmInterview.<init>(VmInterview.java:89)
        at com.sun.tck.cdf.interview.CDFTCKInterview.init(CDFTCKInterview.java:78)
        at com.sun.tck.cdf.interview.CDFTCKInterview.<init>(CDFTCKInterview.java:52)
        at com.sun.tck.cdf.javatest.CDFTestSuite.createInterview(CDFTestSuite.java:46)
        at com.sun.javatest.InterviewParameters.open(InterviewParameters.java:940)
        at com.sun.javatest.InterviewParameters.open(InterviewParameters.java:866)
        at com.sun.javatest.InterviewParameters.open(InterviewParameters.java:1124)

            dfazunen Dmitry Fazunenko (Inactive)
            kromanovorcl Konstantin Romanovskiy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: