< prev index next >

## src/com/sun/javatest/audit/Audit.java

Print this page

    *** 104,117 ****
           * @param excludeList The excludeList against which to check excluded test cases
           * @param workDir The set of results
           */
          public Audit(TestFinderQueue tfq, ExcludeList excludeList, WorkDirectory workDir)
          {
    !         Vector badChecksumTestsV = new Vector();
    !         Vector badTestDescriptionsV = new Vector();
    !         Vector badTestCaseTestsV = new Vector();
    !         Vector badTestsV = new Vector();

              workDir.getTestResultTable().waitUntilReady();

              TestDescription td;
              while ((td = tfq.next()) != null) {
    --- 104,117 ----
           * @param excludeList The excludeList against which to check excluded test cases
           * @param workDir The set of results
           */
          public Audit(TestFinderQueue tfq, ExcludeList excludeList, WorkDirectory workDir)
          {
    !         Vector<TestResult> badChecksumTestsV = new Vector<>();
    !         Vector<TestResult> badTestDescriptionsV = new Vector<>();
    !         Vector<TestResult> badTestCaseTestsV = new Vector<>();
    !         Vector<TestDescription> badTestsV = new Vector<>();

              workDir.getTestResultTable().waitUntilReady();

              TestDescription td;
              while ((td = tfq.next()) != null) {
    *** 134,146 ****
                      Map trEnv = tr.getEnvironment();
                      for (Iterator i = trEnv.entrySet().iterator(); i.hasNext(); ) {
                          Map.Entry e = (Map.Entry) (i.next());
                          String key = (String) (e.getKey());
                          String value = (String) (e.getValue());
    !                     Vector allValuesForKey = (Vector)(envTable.get(key));
                          if (allValuesForKey == null) {
    !                         allValuesForKey = new Vector();
                              envTable.put(key, allValuesForKey);
                          }
                          if (!allValuesForKey.contains(value))
                              allValuesForKey.addElement(value);
                      }
    --- 134,146 ----
                      Map trEnv = tr.getEnvironment();
                      for (Iterator i = trEnv.entrySet().iterator(); i.hasNext(); ) {
                          Map.Entry e = (Map.Entry) (i.next());
                          String key = (String) (e.getKey());
                          String value = (String) (e.getValue());
    !                     Vector<String> allValuesForKey = envTable.get(key);
                          if (allValuesForKey == null) {
    !                         allValuesForKey = new Vector<>();
                              envTable.put(key, allValuesForKey);
                          }
                          if (!allValuesForKey.contains(value))
                              allValuesForKey.addElement(value);
                      }
    *** 167,177 ****
                  }
              }

              for (Enumeration e = envTable.keys(); e.hasMoreElements(); ) {
                  String key = (String)(e.nextElement());
    !             Vector allValuesForKey = (Vector)(envTable.get(key));
                  envCounts[allValuesForKey.size() == 1 ? 0 : 1]++;
              }

              if (badChecksumTestsV.size() > 0) {
                  badChecksumTests = new TestResult[badChecksumTestsV.size()];
    --- 167,177 ----
                  }
              }

              for (Enumeration e = envTable.keys(); e.hasMoreElements(); ) {
                  String key = (String)(e.nextElement());
    !             Vector allValuesForKey = envTable.get(key);
                  envCounts[allValuesForKey.size() == 1 ? 0 : 1]++;
              }

              if (badChecksumTestsV.size() > 0) {
                  badChecksumTests = new TestResult[badChecksumTestsV.size()];
    *** 490,508 ****
           */
          private void showEnvValues(boolean showAll) {
              out.println();
              out.print(i18n.getString("adt.envList.title"));

    !         SortedSet ss = new TreeSet();
              for (Enumeration e = envTable.keys(); e.hasMoreElements(); ) {
                  String key = (String)(e.nextElement());
                  ss.add(key);
              }

              for (Iterator iter = ss.iterator(); iter.hasNext(); ) {
                  String key = (String) (iter.next());
    !             Vector allValuesForKey = (Vector)(envTable.get(key));
                  if (allValuesForKey.size() == 1) {
                      if (showAll)
                          out.println(i18n.getString("adt.envKeyValue",
                                                  new Object[] {key, allValuesForKey.elementAt(0)}));
                  }
    --- 490,508 ----
           */
          private void showEnvValues(boolean showAll) {
              out.println();
              out.print(i18n.getString("adt.envList.title"));

    !         SortedSet<String> ss = new TreeSet<>();
              for (Enumeration e = envTable.keys(); e.hasMoreElements(); ) {
                  String key = (String)(e.nextElement());
                  ss.add(key);
              }

              for (Iterator iter = ss.iterator(); iter.hasNext(); ) {
                  String key = (String) (iter.next());
    !             Vector allValuesForKey = envTable.get(key);
                  if (allValuesForKey.size() == 1) {
                      if (showAll)
                          out.println(i18n.getString("adt.envKeyValue",
                                                  new Object[] {key, allValuesForKey.elementAt(0)}));
                  }
    *** 690,700 ****

          private void initDateFormats() {
              // Create an array of possible date formats to parse dates in .jtr files.
              // Most likely is Unix C time in English; the array will be reordered in use
              // by moving the recently used entries to the front of the array.
    !         Vector v = new Vector();

              // generic Java default
              // 10-Sep-99 3:25:11 PM
              v.addElement(DateFormat.getDateTimeInstance());
              v.addElement(DateFormat.getDateTimeInstance(DateFormat.DEFAULT,
    --- 690,700 ----

          private void initDateFormats() {
              // Create an array of possible date formats to parse dates in .jtr files.
              // Most likely is Unix C time in English; the array will be reordered in use
              // by moving the recently used entries to the front of the array.
    !         Vector<DateFormat> v = new Vector<>();

              // generic Java default
              // 10-Sep-99 3:25:11 PM
              v.addElement(DateFormat.getDateTimeInstance());
              v.addElement(DateFormat.getDateTimeInstance(DateFormat.DEFAULT,
    *** 731,739 ****
          private TestResult[] badChecksumTests;
          private Date earliestStart;
          private Date latestStart;
          private DateFormat[] dateFormats;

    !     private Hashtable envTable = new Hashtable();
          private PrintStream out;
          private static I18NResourceBundle i18n = I18NResourceBundle.getBundleForClass(Audit.class);
      }
    --- 731,739 ----
          private TestResult[] badChecksumTests;
          private Date earliestStart;
          private Date latestStart;
          private DateFormat[] dateFormats;

    !     private Hashtable<String, Vector<String>> envTable = new Hashtable<>();
          private PrintStream out;
          private static I18NResourceBundle i18n = I18NResourceBundle.getBundleForClass(Audit.class);
      }

< prev index next >